From 8bfcf88477642116164cc3eecf5d3cba133c3ecc Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 17 Jan 2010 11:32:11 +0000 Subject: [PATCH] i2c-ali1563: Remove sparse warnings. Backported from Linux 2.6, original patch from Marton Nemeth: 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 git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-2.10@5816 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + kernel/busses/i2c-ali1563.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 558323b6..e5b1411b 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ lm_sensors CHANGES file SVN-HEAD File lm_sensors.lsm: Delete, don't advertise a legacy branch File doc/developers/release_checklist: Skip mail to lsm + Module i2c-ali1563: Remove sparse warnings (2.6 backport) Module i2c-amd8111: Fix timeout handling (2.6 backport) Module i2c-piix4: ATI SB800 is not actually supported Module it87: Properly decode -128 degrees C (2.6 backport) diff --git a/kernel/busses/i2c-ali1563.c b/kernel/busses/i2c-ali1563.c index 87cc2d2c..5c936b92 100644 --- a/kernel/busses/i2c-ali1563.c +++ b/kernel/busses/i2c-ali1563.c @@ -92,9 +92,9 @@ static int ali1563_transaction(struct i2c_adapter * a) outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); timeout = ALI1563_MAX_TIMEOUT; - do + do { i2c_delay(1); - while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout); + } while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout); printk(KERN_DEBUG "ali1563: Transaction (post): STS=%02x, CNTL1=%02x, " "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n", @@ -162,9 +162,9 @@ static int ali1563_block_start(struct i2c_adapter * a) outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2); timeout = ALI1563_MAX_TIMEOUT; - do + do { i2c_delay(1); - while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout); + } while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout); printk(KERN_DEBUG "ali1563: Block (post): STS=%02x, CNTL1=%02x, " "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",