[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1291247014-21525-1-git-send-email-peterhuewe@gmx.de>
Date: Thu, 2 Dec 2010 00:43:32 +0100
From: Peter Huewe <peterhuewe@....de>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: Mark Allyn <mark.a.allyn@...el.com>,
Alan Cox <alan@...ux.intel.com>,
Ben Hutchings <ben@...adent.org.uk>,
Joe Perches <joe@...ches.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Peter Huewe <peterhuewe@....de>
Subject: [PATCH 1/3] staging/sep: Fix sparse warning 'do-while statement is not a compound statement'
This patch fixes the warning generated by sparse: 'do-while statement is
not a compound statement' by adding the necessary brackets around the do
block
Signed-off-by: Peter Huewe <peterhuewe@....de>
---
KernelVersion: linux-next-20101202
drivers/staging/sep/sep_dev.h | 4 ++--
drivers/staging/sep/sep_driver.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/sep/sep_dev.h b/drivers/staging/sep/sep_dev.h
index 7b4993b..0ffe68c 100644
--- a/drivers/staging/sep/sep_dev.h
+++ b/drivers/staging/sep/sep_dev.h
@@ -147,9 +147,9 @@ static inline u32 sep_read_reg(struct sep_device *dev, int reg)
static inline void sep_wait_sram_write(struct sep_device *dev)
{
u32 reg_val;
- do
+ do {
reg_val = sep_read_reg(dev, HW_SRAM_DATA_READY_REG_ADDR);
- while (!(reg_val & 1));
+ } while (!(reg_val & 1));
}
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 7633111..d734887 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -2587,9 +2587,9 @@ static int sep_start_handler(struct sep_device *sep)
dev_dbg(&sep->pdev->dev, "sep_start_handler start\n");
/* Wait in polling for message from SEP */
- do
+ do {
reg_val = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR);
- while (!reg_val);
+ } while (!reg_val);
/* Check the value */
if (reg_val == 0x1)
@@ -2754,9 +2754,9 @@ static int sep_init_handler(struct sep_device *sep, unsigned long arg)
/* Wait for acknowledge */
dev_dbg(&sep->pdev->dev, "init; waiting for msg response\n");
- do
+ do {
reg_val = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR);
- while (!(reg_val & 0xFFFFFFFD));
+ } while (!(reg_val & 0xFFFFFFFD));
if (reg_val == 0x1) {
dev_warn(&sep->pdev->dev, "init; device int failed\n");
@@ -2774,9 +2774,9 @@ static int sep_init_handler(struct sep_device *sep, unsigned long arg)
/* Wait for response */
dev_dbg(&sep->pdev->dev, "init; waiting for zero set response\n");
- do
+ do {
reg_val = sep_read_reg(sep, HW_HOST_SEP_HOST_GPR3_REG_ADDR);
- while (reg_val != 0);
+ } while (reg_val != 0);
end_function:
dev_dbg(&sep->pdev->dev, "init is done\n");
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists