mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Ari Sundholm <asundhol@cs.hut.fi>
Cc: platform-driver-x86@vger.kernel.org,
	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 13:31:30 -0400	[thread overview]
Message-ID: <11648.1408555890@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Wed, 20 Aug 2014 20:03:26 +0300." <alpine.GSO.2.00.1408201955290.8292@hutcs>

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

On Wed, 20 Aug 2014 20:03:26 +0300, Ari Sundholm said:
> From: Ari Sundholm <ari@tuxera.com>
>
> This reverts commit bdc3ae7221213963f438faeaa69c8b4a2195f491.

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

I'm not convinced that's right either.  If we come in and mode == 1, then
the mode != 2 is true, and yoinks...

I think this wanted to be   sscanf() != 1 || ! (mode == 2 || mode == 1)

I'll spin a patch against the reverted version if desired.

[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]

  reply	other threads:[~2014-08-20 17:31 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 [this message]
2014-08-20 18:16 ` Ari Sundholm

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=11648.1408555890@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=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®