All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Iles <jamie@jamieiles.com>
To: Joe Perches <joe@perches.com>
Cc: roel <roel.kluin@gmail.com>, Jamie Iles <jamie@jamieiles.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-crypto <linux-crypto@vger.kernel.org>
Subject: Re: drivers/crypto/picoxcell_crypto.c: boolean and / or confusion
Date: Tue, 13 Dec 2011 09:50:41 +0000	[thread overview]
Message-ID: <20111213095041.GA2496@totoro> (raw)
In-Reply-To: <1323733493.1812.10.camel@joe2Laptop>

Hi Joe,

On Mon, Dec 12, 2011 at 03:44:53PM -0800, Joe Perches wrote:
> On Tue, 2011-12-13 at 00:06 +0100, roel wrote:
> > The test not [val1] or not [val2] always evaluates to true
> 
> Hey Jamie and Roel
> 
> Looking at drivers with:
> 
> $ grep -rP --include=*.[ch] "(\b[\w\[\]\>\._\-]+)\s*\!\=\s*[\w\[\]\>\._\-]+\s*\|\|\s*\1\s*\!\=" drivers
> 
> drivers/crypto/picoxcell_crypto.c:	if ((len != AES_KEYSIZE_128 || len != AES_KEYSIZE_256) &&
> drivers/crypto/picoxcell_crypto.c:	} else if ((len != AES_KEYSIZE_128 || len != AES_KEYSIZE_256) &&
> 
> Most likely these should be && not ||.

Yup, the original code was incorrect.  Patch to follow.  Thanks Joe!

Jamie

  parent reply	other threads:[~2011-12-13  9:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 23:06 ceph, cifs, nfs, fuse: boolean and / or confusion roel
2011-12-12 23:06 ` roel
     [not found] ` <4EE688FC.8090606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-12 23:28   ` Andrew Morton
2011-12-12 23:28     ` Andrew Morton
     [not found]     ` <20111212152856.871a8301.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2011-12-12 23:39       ` Trond Myklebust
2011-12-12 23:39         ` Trond Myklebust
     [not found]         ` <1323733153.13849.17.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-12-12 23:45           ` Trond Myklebust
2011-12-12 23:45             ` Trond Myklebust
     [not found]             ` <1323733511.13849.19.camel-SyLVLa/KEI9HwK5hSS5vWB2eb7JE58TQ@public.gmane.org>
2011-12-12 23:54               ` Andrew Morton
2011-12-12 23:54                 ` Andrew Morton
     [not found]                 ` <20111212155423.24543d6a.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2011-12-13  5:29                   ` Sage Weil
2011-12-13  5:29                     ` Sage Weil
     [not found]                     ` <Pine.LNX.4.64.1112122123040.17811-vIokxiIdD2AQNTJnQDzGJqxOck334EZe@public.gmane.org>
2011-12-13 11:25                       ` Miklos Szeredi
2011-12-13 11:25                         ` Miklos Szeredi
2011-12-13 14:34           ` Jeff Layton
2011-12-13 14:34             ` Jeff Layton
2011-12-12 23:44 ` drivers/crypto/picoxcell_crypto.c: " Joe Perches
2011-12-12 23:55   ` drivers/media/video/s5p-fimc/fimc-capture.c: " Joe Perches
2011-12-13 14:26     ` Sylwester Nawrocki
2011-12-13  9:50   ` Jamie Iles [this message]
2011-12-13  0:02 ` drivers/scsi/bfa/bfa_fcpim.c: " Joe Perches
2011-12-13  0:45   ` Jing Huang
2011-12-13  0:45     ` Jing Huang
2011-12-13  0:14 ` drivers/dma/sirf-dma.c: " Joe Perches

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=20111213095041.GA2496@totoro \
    --to=jamie@jamieiles.com \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.