From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= Subject: [PATCH] i2c-ali1563: remove sparse warnings Date: Sun, 10 Jan 2010 15:33:23 +0100 Message-ID: <4B49E533.8050808@freemail.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cocci-bounces@diku.dk Errors-To: cocci-bounces@diku.dk To: Jean Delvare , Ben Dooks Cc: linux-i2c@vger.kernel.org, cocci@diku.dk, LKML List-Id: linux-i2c@vger.kernel.org From: M=C3=A1rton N=C3=A9meth Remove the following sparse warnings (see "make C=3D1"): * drivers/i2c/busses/i2c-ali1563.c:91:3: warning: do-while statement is = not a compound statement * drivers/i2c/busses/i2c-ali1563.c:161:3: warning: do-while statement is= not a compound statement Signed-off-by: M=C3=A1rton N=C3=A9meth --- --- linux/drivers/i2c/busses/i2c-ali1563.c.orig 2010-01-10 13:40:31.00000= 0000 +0100 +++ linux/drivers/i2c/busses/i2c-ali1563.c 2010-01-10 13:54:16.000000000 = +0100 @@ -87,9 +87,9 @@ outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); timeout =3D ALI1563_MAX_TIMEOUT; - do + do { msleep(1); - while (((data =3D inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout); + } while (((data =3D inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout); dev_dbg(&a->dev, "Transaction (post): STS=3D%02x, CNTL1=3D%02x, " "CNTL2=3D%02x, CMD=3D%02x, ADD=3D%02x, DAT0=3D%02x, DAT1=3D%02x\n", @@ -157,9 +157,9 @@ outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); timeout =3D ALI1563_MAX_TIMEOUT; - do + do { msleep(1); - while (!((data =3D inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout); + } while (!((data =3D inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout); dev_dbg(&a->dev, "Block (post): STS=3D%02x, CNTL1=3D%02x, " "CNTL2=3D%02x, CMD=3D%02x, ADD=3D%02x, DAT0=3D%02x, DAT1=3D%02x\n", _______________________________________________ Cocci mailing list Cocci@diku.dk http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753763Ab0AJOdd (ORCPT ); Sun, 10 Jan 2010 09:33:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753713Ab0AJOdc (ORCPT ); Sun, 10 Jan 2010 09:33:32 -0500 Received: from mail02a.mail.t-online.hu ([84.2.40.7]:65163 "EHLO mail02a.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753691Ab0AJOda (ORCPT ); Sun, 10 Jan 2010 09:33:30 -0500 Message-ID: <4B49E533.8050808@freemail.hu> Date: Sun, 10 Jan 2010 15:33:23 +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 Delvare , Ben Dooks CC: linux-i2c@vger.kernel.org, LKML , Julia Lawall , cocci@diku.dk Subject: [PATCH] i2c-ali1563: remove sparse warnings Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-DCC-mail.t-online.hu-Metrics: mail02a.mail.t-online.hu 32721; Body=6 Fuz1=6 Fuz2=6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Márton Németh Remove the following sparse warnings (see "make C=1"): * drivers/i2c/busses/i2c-ali1563.c:91:3: warning: do-while statement is not a compound statement * drivers/i2c/busses/i2c-ali1563.c:161:3: warning: do-while statement is not a compound statement Signed-off-by: Márton Németh --- --- linux/drivers/i2c/busses/i2c-ali1563.c.orig 2010-01-10 13:40:31.000000000 +0100 +++ linux/drivers/i2c/busses/i2c-ali1563.c 2010-01-10 13:54:16.000000000 +0100 @@ -87,9 +87,9 @@ outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); timeout = ALI1563_MAX_TIMEOUT; - do + do { msleep(1); - while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout); + } while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout); dev_dbg(&a->dev, "Transaction (post): STS=%02x, CNTL1=%02x, " "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n", @@ -157,9 +157,9 @@ outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); timeout = ALI1563_MAX_TIMEOUT; - do + do { msleep(1); - while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout); + } while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout); dev_dbg(&a->dev, "Block (post): STS=%02x, CNTL1=%02x, " "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",