Skip to contentSkip to conversation

Fix warnings in defxx.c

PATCH In review Andi Kleen 2 participants 2 messages Oct 7, 2003

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Fix warnings in defxx.c

Fix harmless 64bit warnings in defxx.c

drivers/net/defxx.c renamed from drivers/net/defxx.c-o +2 -2
diff -u linux-2.5-cleanup/drivers/net/defxx.c-o linux-2.5-cleanup/drivers/net/defxx.c
@@ -2664,8 +2664,8 @@
  
 static void my_skb_align(struct sk_buff *skb, int n)
 {
-	u32 x=(u32)skb->data;	/* We only want the low bits .. */
-	u32 v;
+	unsigned long x=(unsigned long)skb->data;	
+	unsigned long v;
 	
 	v=(x+n-1)&~(n-1);	/* Where we want to be */
 	
#1 lore raw
Quoted 6 lines · Andi Kleen

Fix harmless 64bit warnings in defxx.c

diff -u linux-2.5-cleanup/drivers/net/defxx.c-o linux-2.5-cleanup/drivers/net/defxx.c

drivers/net/defxx.c line 2670

Quoted 9 lines
drivers/net/defxx.c renamed from drivers/net/defxx.c-o +2 -2
@@ -2664,8 +2664,8 @@
 
 static void my_skb_align(struct sk_buff *skb, int n)
 {
-	u32 x=(u32)skb->data;	/* We only want the low bits .. */
-	u32 v;
+	unsigned long x=(unsigned long)skb->data;	
+	unsigned long v;
 
 	v=(x+n-1)&~(n-1);	/* Where we want to be */

Thanks for the fix. I have a 64-bit system to test the driver at the run
time (for both endiannesses, even), so in a long run I'm going to keep an eye on such bits.

Signature · 3 lines
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email protected], PGP key available        +