From patchwork Fri Dec 11 21:33:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOpbWV0aCBNw6FydG9u?= X-Patchwork-Id: 2293 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 11 Dec 2009 21:33:44 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Fri, 11 Dec 2009 19:34:42 -0200 (BRST) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NJD7Q-0006zf-MA; Fri, 11 Dec 2009 21:33:44 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758440AbZLKVdg (ORCPT + 1 other); Fri, 11 Dec 2009 16:33:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758218AbZLKVdg (ORCPT ); Fri, 11 Dec 2009 16:33:36 -0500 Received: from mail01a.mail.t-online.hu ([84.2.40.6]:49584 "EHLO mail01a.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754165AbZLKVdf (ORCPT ); Fri, 11 Dec 2009 16:33:35 -0500 Received: from [192.168.1.64] (dsl5402C437.pool.t-online.hu [84.2.196.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail01a.mail.t-online.hu (Postfix) with ESMTPSA id CC0FC797DAC; Fri, 11 Dec 2009 22:32:05 +0100 (CET) Message-ID: <4B22BAB0.5070604@freemail.hu> Date: Fri, 11 Dec 2009 22:33:36 +0100 From: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Jean-Francois Moine , V4L Mailing List Subject: [PATCH] gspca m5602: eliminate sparse warnings X-DCC-mail.t-online.hu-Metrics: mail01a.mail.t-online.hu 32721; Body=2 Fuz1=2 Fuz2=2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Márton Németh Eliminate the following sparse warnings (see "make C=1"): * v4l/m5602_s5k4aa.c:530:23: warning: dubious: x | !y * v4l/m5602_s5k4aa.c:575:23: warning: dubious: x | !y Signed-off-by: Márton Németh --- ../../m5602_s5k4aa_dubious.patch -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -r f5662ce08663 linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c --- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c Fri Dec 11 09:53:41 2009 +0100 +++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c Fri Dec 11 22:25:50 2009 +0100 @@ -527,7 +527,7 @@ err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1); if (err < 0) return err; - data = (data & 0xfe) | !val; + data = (data & 0xfe) | (val ? 0 : 1); err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1); return err; } @@ -572,7 +572,7 @@ err = m5602_read_sensor(sd, S5K4AA_COLSTART_LO, &data, 1); if (err < 0) return err; - data = (data & 0xfe) | !val; + data = (data & 0xfe) | (val ? 0 : 1); err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1); return err; }