Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b5b3f3d authored by Randy Dunlap's avatar Randy Dunlap Committed by David S. Miller
Browse files

[ATM]: fix sparse gfp nocast warnings



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: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5181ab0
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -178,13 +178,11 @@ 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
    if (!chunk)
	printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n",			size, flags);
    
    return chunk;
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);