All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/crc32.c: fix sparse warnings
@ 2009-04-15 19:28 H Hartley Sweeten
  0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2009-04-15 19:28 UTC (permalink / raw)
  To: linux-kernel

Fix four sparse warnings in lib/crc32.c.

	warning: symbol 'p' shadows an earlier one

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/lib/crc32.c b/lib/crc32.c
index 49d1c9e..14a2e5a 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -85,9 +85,9 @@ u32 __pure crc32_le(u32 crc, unsigned char const *p,
size_t len)
 	/* Align it */
 	if(unlikely(((long)b)&3 && len)){
 		do {
-			u8 *p = (u8 *)b;
-			DO_CRC(*p++);
-			b = (void *)p;
+			u8 *_p = (u8 *)b;
+			DO_CRC(*_p++);
+			b = (void *)_p;
 		} while ((--len) && ((long)b)&3 );
 	}
 	if(likely(len >= 4)){
@@ -108,9 +108,9 @@ u32 __pure crc32_le(u32 crc, unsigned char const *p,
size_t len)
 	/* And the last few bytes */
 	if(len){
 		do {
-			u8 *p = (u8 *)b;
-			DO_CRC(*p++);
-			b = (void *)p;
+			u8 *_p = (u8 *)b;
+			DO_CRC(*_p++);
+			b = (void *)_p;
 		} while (--len);
 	}
 
@@ -183,9 +183,9 @@ u32 __pure crc32_be(u32 crc, unsigned char const *p,
size_t len)
 	/* Align it */
 	if(unlikely(((long)b)&3 && len)){
 		do {
-			u8 *p = (u8 *)b;
-			DO_CRC(*p++);
-			b = (u32 *)p;
+			u8 *_p = (u8 *)b;
+			DO_CRC(*_p++);
+			b = (u32 *)_p;
 		} while ((--len) && ((long)b)&3 );
 	}
 	if(likely(len >= 4)){
@@ -206,9 +206,9 @@ u32 __pure crc32_be(u32 crc, unsigned char const *p,
size_t len)
 	/* And the last few bytes */
 	if(len){
 		do {
-			u8 *p = (u8 *)b;
-			DO_CRC(*p++);
-			b = (void *)p;
+			u8 *_p = (u8 *)b;
+			DO_CRC(*_p++);
+			b = (void *)_p;
 		} while (--len);
 	}
 	return __be32_to_cpu(crc);
@@ -346,7 +346,7 @@ EXPORT_SYMBOL(crc32_be);
  * in the correct multiple to subtract, we can shift a byte at a time.
  * This produces a 40-bit (rather than a 33-bit) intermediate
remainder,
  * but again the multiple of the polynomial to subtract depends only on
- * the high bits, the high 8 bits in this case.  
+ * the high bits, the high 8 bits in this case.
  *
  * The multiple we need in that case is the low 32 bits of a 40-bit
  * value whose high 8 bits are given, and which is a multiple of the 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-15 19:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15 19:28 [PATCH] lib/crc32.c: fix sparse warnings H Hartley Sweeten

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.