mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tom Spink" <tspink@gmail.com>
To: "Alexey Zaytsev" <alexey.zaytsev@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Jiri Kosina" <jkosina@suse.cz>,
	"Trivial Kernel Patches" <trivial@kernel.org>
Subject: Re: [PATCH 5/5] Fix dubious bitwise 'and' usage spotted by sparse.
Date: Sat, 10 Jan 2009 09:47:15 +0000	[thread overview]
Message-ID: <7b9198260901100147i2d94f42fhc0e9a4b42338bc2a@mail.gmail.com> (raw)
In-Reply-To: <20090109234828.11800.10915.stgit@zaytsev.su>

2009/1/9 Alexey Zaytsev <alexey.zaytsev@gmail.com>:
> It doesn't change the semantics, but clearly
> the logical 'and' was meant to be used here.
>
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> ---
>  drivers/usb/wusbcore/security.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c
> index a101cad..8f953ab 100644
> --- a/drivers/usb/wusbcore/security.c
> +++ b/drivers/usb/wusbcore/security.c
> @@ -626,7 +626,7 @@ void wusbhc_gtk_rekey(struct wusbhc *wusbhc)
>                struct wusb_dev *wusb_dev;
>
>                wusb_dev = wusbhc->port[p].wusb_dev;
> -               if (!wusb_dev || !wusb_dev->usb_dev | !wusb_dev->usb_dev->authenticated)
> +               if (!wusb_dev || !wusb_dev->usb_dev || !wusb_dev->usb_dev->authenticated)
>                        continue;
>
>                usb_fill_control_urb(wusb_dev->set_gtk_urb, wusb_dev->usb_dev,
>

Hi Alexey,

This one is a logical 'or'... your changelog says 'and'!

-- 
Tom Spink
Douglas William Jerrold  - "The only athletic sport I ever mastered
was backgammon."

  reply	other threads:[~2009-01-10  9:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 23:47 [PATCH 0/5] [trivial] Fix dubious bitwise and/or usage Alexey Zaytsev
2009-01-09 23:47 ` [PATCH 1/5] Fix dubious bitwise 'or' usage spotted by sparse Alexey Zaytsev
2009-01-09 23:48 ` [PATCH 2/5] " Alexey Zaytsev
2009-01-09 23:48 ` [PATCH 3/5] Fix dubious bitwise 'and' " Alexey Zaytsev
2009-01-09 23:56   ` Jiri Kosina
2009-01-09 23:48 ` [PATCH 4/5] " Alexey Zaytsev
2009-01-09 23:58   ` Jiri Kosina
2009-01-09 23:48 ` [PATCH 5/5] " Alexey Zaytsev
2009-01-10  9:47   ` Tom Spink [this message]
2009-01-10  0:00 ` [PATCH 0/5] [trivial] Fix dubious bitwise and/or usage Jiri Kosina
2009-01-10  1:28   ` Alexey Zaytsev

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=7b9198260901100147i2d94f42fhc0e9a4b42338bc2a@mail.gmail.com \
    --to=tspink@gmail.com \
    --cc=alexey.zaytsev@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@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®