Re: Some cleanup patches for: '...lvalues is deprecated'

From: Joel Soete
Date: Fri Jul 30 2004 - 12:33:02 EST


And finaly may be lib/crc32.c diff like:
--- linux-2.4.27-rc3-pa6mm/lib/crc32.c.Orig 2004-06-29 11:29:31.000000000
+0200
+++ linux-2.4.27-rc3-pa6mm/lib/crc32.c 2004-07-30 17:17:56.143095488 +0200
@@ -99,7 +99,9 @@
/* Align it */
if(unlikely(((long)b)&3 && len)){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *pb = (u8 *)b;
+ DO_CRC(*pb++);
+ b = (u32 *)pb;
} while ((--len) && ((long)b)&3 );
}
if(likely(len >= 4)){
@@ -120,7 +122,9 @@
/* And the last few bytes */
if(len){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *pb = (u8 *)b;
+ DO_CRC(*pb++);
+ b = (u32 *)pb;
} while (--len);
}

@@ -200,7 +204,9 @@
/* Align it */
if(unlikely(((long)b)&3 && len)){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *pb = (u8 *)b;
+ DO_CRC(*pb++);
+ b = (u32 *)pb;
} while ((--len) && ((long)b)&3 );
}
if(likely(len >= 4)){
@@ -221,7 +227,9 @@
/* And the last few bytes */
if(len){
do {
- DO_CRC(*((u8 *)b)++);
+ u8 *pb = (u8 *)b;
+ DO_CRC(*pb++);
+ b = (u32 *)pb;
} while (--len);
}
return __be32_to_cpu(crc);
=========><=========

(i prefer pb to avoid possible reading confusion with outer p parameter?
and replace usage of (void *) by (u32 *) as the actual b type)

Thanks for additional attention,
Joel

---------------------------------------------------------------------------
Tiscali ADSL LIGHT, 19,95 EUR/mois pendant 6 mois, c'est le moment de faire
le pas!
http://reg.tiscali.be/default.asp?lg=fr




Attachment: lib-crc32.c.diff
Description: Binary data