From 04483e150d412f5861a00c30581df7ba90a816e7 Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Thu, 24 Feb 2011 23:47:08 +0100 Subject: bitops: fix test_and_change_bit() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ./bitops.h:192: warning: ‘old’ is used uninitialized in this function Signed-off-by: Corentin Chary Signed-off-by: Blue Swirl --- bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitops.h') diff --git a/bitops.h b/bitops.h index ae7bcb1b1c..e2b9df3155 100644 --- a/bitops.h +++ b/bitops.h @@ -187,7 +187,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); - unsigned long old; + unsigned long old = *p; *p = old ^ mask; return (old & mask) != 0; -- cgit v1.2.3