From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: [PATCH] i2c-ali1563: remove sparse warnings Date: Sun, 10 Jan 2010 16:45:08 +0100 Message-ID: <20100110164508.51fc29a7@hyperion.delvare> References: <4B49E533.8050808@freemail.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <4B49E533.8050808-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= Cc: Ben Dooks , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML , Julia Lawall , cocci-dAYI7NvHqcQ@public.gmane.org List-Id: linux-i2c@vger.kernel.org On Sun, 10 Jan 2010 15:33:23 +0100, N=C3=A9meth M=C3=A1rton wrote: > From: M=C3=A1rton N=C3=A9meth >=20 > 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 statemen= t is not a compound statement >=20 > Signed-off-by: M=C3=A1rton N=C3=A9meth > --- > --- linux/drivers/i2c/busses/i2c-ali1563.c.orig 2010-01-10 13:40:31.0= 00000000 +0100 > +++ linux/drivers/i2c/busses/i2c-ali1563.c 2010-01-10 13:54:16.000000= 000 +0100 > @@ -87,9 +87,9 @@ > outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); >=20 > 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) && --timeou= t); >=20 > 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); >=20 > 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) && --timeo= ut); >=20 > 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"= , Applied, thanks. --=20 Jean Delvare From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753643Ab0AJPpN (ORCPT ); Sun, 10 Jan 2010 10:45:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753100Ab0AJPpM (ORCPT ); Sun, 10 Jan 2010 10:45:12 -0500 Received: from bamako.nerim.net ([62.4.17.28]:59449 "EHLO bamako.nerim.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459Ab0AJPpL convert rfc822-to-8bit (ORCPT ); Sun, 10 Jan 2010 10:45:11 -0500 Date: Sun, 10 Jan 2010 16:45:08 +0100 From: Jean Delvare To: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= Cc: Ben Dooks , linux-i2c@vger.kernel.org, LKML , Julia Lawall , cocci@diku.dk Subject: Re: [PATCH] i2c-ali1563: remove sparse warnings Message-ID: <20100110164508.51fc29a7@hyperion.delvare> In-Reply-To: <4B49E533.8050808@freemail.hu> References: <4B49E533.8050808@freemail.hu> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.14.4; i586-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 10 Jan 2010 15:33:23 +0100, Németh Márton wrote: > 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", Applied, thanks. -- Jean Delvare