From d83d282bcbf24ec8ddd4f0eb57f7ad302c431b8a Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 11 Apr 2011 16:00:00 -0700 Subject: s2io: Fix warnings due to -Wunused-but-set-variable. Most of these are cases where we are trying to read back a register after a write to ensure completion. Simply pre-fixing the readl() or readq() with "(void)" is sufficient because these are volatile operations and the compiler cannot eliminate them just because no real assignment takes place. The case of free_rxd_blk()'s assignments to "struct buffAdd *ba" is a real spurious assignment as this variable is completely otherwise unused. Signed-off-by: David S. Miller Acked-by: Jon Mason --- drivers/net/s2io.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'drivers/net/s2io.h') diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 628fd278866a..800b3a44e653 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h @@ -1002,18 +1002,16 @@ static inline void writeq(u64 val, void __iomem *addr) #define LF 2 static inline void SPECIAL_REG_WRITE(u64 val, void __iomem *addr, int order) { - u32 ret; - if (order == LF) { writel((u32) (val), addr); - ret = readl(addr); + (void) readl(addr); writel((u32) (val >> 32), (addr + 4)); - ret = readl(addr + 4); + (void) readl(addr + 4); } else { writel((u32) (val >> 32), (addr + 4)); - ret = readl(addr + 4); + (void) readl(addr + 4); writel((u32) (val), addr); - ret = readl(addr); + (void) readl(addr); } } -- cgit v1.2.1