mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ari Sundholm <asundhol@cs.hut.fi>
To: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Matthew Garrett <matthew.garrett@nebula.com>
Subject: Re: [PATCH] Revert "platform/x86/toshiba-apci.c possible bad if test?"
Date: Wed, 20 Aug 2014 21:16:52 +0300 (EEST)	[thread overview]
Message-ID: <alpine.GSO.2.00.1408202114140.8435@hutcs> (raw)
In-Reply-To: <alpine.GSO.2.00.1408201955290.8292@hutcs>


On Wed, 20 Aug 2014, Ari Sundholm wrote:

> -	if (sscanf(buf, "%i", &mode) != 1  || (mode != 2 || mode != 1))
> +	if (sscanf(buf, "%i", &mode) != 1 && (mode != 2 || mode != 1))
>  		return -EINVAL;

Note that the condition still looks wrong even after the revert, as
(mode != 2 || mode != 1) is always true. Anybody guess what the actual 
intent was?

Best regards,
Ari Sundholm
asundhol@cs.hut.fi

      parent reply	other threads:[~2014-08-20 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 17:03 Ari Sundholm
2014-08-20 17:31 ` Valdis.Kletnieks
2014-08-20 18:16 ` Ari Sundholm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.GSO.2.00.1408202114140.8435@hutcs \
    --to=asundhol@cs.hut.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.garrett@nebula.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®