]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ATM]: fix sparse gfp nocast warnings
authorRandy Dunlap <rdunlap@xenotime.net>
Wed, 5 Oct 2005 05:38:44 +0000 (22:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Oct 2005 05:38:44 +0000 (22:38 -0700)
Fix implicit nocast warnings in atm code:
net/atm/atm_misc.c:35:44: warning: implicit cast to nocast type
drivers/atm/fore200e.c:183:33: warning: implicit cast to nocast type

Also use kzalloc() instead of kmalloc().

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/fore200e.c
include/linux/atmdev.h
net/atm/atm_misc.c

index 2bf723a7b6e62c12918b865cac2cf6c970d81736..6f1a83c9d9e0c63b71c1d2e1fb98c7b114a30d13 100644 (file)
@@ -178,14 +178,12 @@ fore200e_irq_itoa(int irq)
 
 
 static void*
-fore200e_kmalloc(int size, int flags)
+fore200e_kmalloc(int size, unsigned int __nocast flags)
 {
-    void* chunk = kmalloc(size, flags);
+    void *chunk = kzalloc(size, flags);
 
-    if (chunk)
-       memset(chunk, 0x00, size);
-    else
-       printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags);
+    if (!chunk)
+       printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n",                        size, flags);
     
     return chunk;
 }
index 9f374cfa1b05ac7afe0495f87939dd4511341e80..f1fd849e5535e35dbe37b22c57c0118e2908e87d 100644 (file)
@@ -457,7 +457,7 @@ static inline void atm_dev_put(struct atm_dev *dev)
 
 int atm_charge(struct atm_vcc *vcc,int truesize);
 struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
-    int gfp_flags);
+    unsigned int __nocast gfp_flags);
 int atm_pcr_goal(struct atm_trafprm *tp);
 
 void vcc_release_async(struct atm_vcc *vcc, int reply);
index b2113c3454ae6b31d0b5faab356990611160b665..71abc99ec815e78bbc050bbf0714a7c8885ccf4d 100644 (file)
@@ -25,7 +25,7 @@ int atm_charge(struct atm_vcc *vcc,int truesize)
 
 
 struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
-    int gfp_flags)
+    unsigned int __nocast gfp_flags)
 {
        struct sock *sk = sk_atm(vcc);
        int guess = atm_guess_pdu2truesize(pdu_size);