Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760095AbZAIX4Y (ORCPT ); Fri, 9 Jan 2009 18:56:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753742AbZAIX4K (ORCPT ); Fri, 9 Jan 2009 18:56:10 -0500 Received: from styx.suse.cz ([82.119.242.94]:45842 "EHLO mail.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753449AbZAIX4J (ORCPT ); Fri, 9 Jan 2009 18:56:09 -0500 Date: Sat, 10 Jan 2009 00:56:08 +0100 (CET) From: Jiri Kosina To: Alexey Zaytsev cc: LKML , Trivial Kernel Patches Subject: Re: [PATCH 3/5] Fix dubious bitwise 'and' usage spotted by sparse. In-Reply-To: <20090109234813.11800.84518.stgit@zaytsev.su> Message-ID: References: <20090109234113.11800.55672.stgit@zaytsev.su> <20090109234813.11800.84518.stgit@zaytsev.su> User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1222 Lines: 35 On Sat, 10 Jan 2009, Alexey Zaytsev wrote: > It doesn't change the semantics, but it looks like > the logical 'and' was meant to be used here. > --- > drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c > index 14b1eac..c3ebcca 100644 > --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c > +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c > @@ -114,7 +114,7 @@ int s5k4aa_read_sensor(struct sd *sd, const u8 address, > if (err < 0) > goto out; > > - for (i = 0; (i < len) & !err; i++) { > + for (i = 0; (i < len) && !err; i++) { > err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i])); > > PDEBUG(D_CONF, "Reading sensor register " Hi Alexey, this one doesn't apply to Linus' tree anymore, the whole s5k4aa_read_sensor() function is not there. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/