Skip to content

Commit

Permalink
[ATM]: Remove unneeded kmalloc() return value casts + tiny whitespace…
Browse files Browse the repository at this point in the history
… cleanup

Small cleanups for drivers/atm/zatm.c
 Get rid of unneeded cast of kmalloc() return value.
 Small whitespace/CodingStyle/formatting cleanup (since I was in there anyway).

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Jesper Juhl authored and davem330 committed Jan 10, 2006
1 parent 12fe2c5 commit 79a3464
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,13 @@ printk("NONONONOO!!!!\n");
u32 *put;
int i;

dsc = (u32 *) kmalloc(uPD98401_TXPD_SIZE*2+
uPD98401_TXBD_SIZE*ATM_SKB(skb)->iovcnt,GFP_ATOMIC);
dsc = kmalloc(uPD98401_TXPD_SIZE * 2 +
uPD98401_TXBD_SIZE * ATM_SKB(skb)->iovcnt, GFP_ATOMIC);
if (!dsc) {
if (vcc->pop) vcc->pop(vcc,skb);
else dev_kfree_skb_irq(skb);
if (vcc->pop)
vcc->pop(vcc, skb);
else
dev_kfree_skb_irq(skb);
return -EAGAIN;
}
/* @@@ should check alignment */
Expand All @@ -683,7 +685,7 @@ printk("NONONONOO!!!!\n");
(ATM_SKB(skb)->atm_options & ATM_ATMOPT_CLP ?
uPD98401_CLPM_1 : uPD98401_CLPM_0));
dsc[1] = 0;
dsc[2] = ATM_SKB(skb)->iovcnt*uPD98401_TXBD_SIZE;
dsc[2] = ATM_SKB(skb)->iovcnt * uPD98401_TXBD_SIZE;
dsc[3] = virt_to_bus(put);
for (i = 0; i < ATM_SKB(skb)->iovcnt; i++) {
*put++ = ((struct iovec *) skb->data)[i].iov_len;
Expand Down

0 comments on commit 79a3464

Please sign in to comment.