From: Jesper Juhl <jesper.juhl@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Werner Almesberger <werner@almesberger.net>,
Chas Williams <chas@cmf.nrl.navy.mil>,
Andrew Morton <akpm@osdl.org>,
Jesper Juhl <jesper.juhl@gmail.com>
Subject: [PATCH 4/6] drivers/atm: Remove unneeded kmalloc() return value casts + tiny whitespace cleanup
Date: Sun, 11 Dec 2005 20:34:40 +0100 [thread overview]
Message-ID: <200512112034.40905.jesper.juhl@gmail.com> (raw)
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 <jesper.juhl@gmail.com>
---
drivers/atm/zatm.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
--- linux-2.6.15-rc5-git1-orig/drivers/atm/zatm.c 2005-10-28 02:02:08.000000000 +0200
+++ linux-2.6.15-rc5-git1/drivers/atm/zatm.c 2005-12-11 20:00:02.000000000 +0100
@@ -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 */
@@ -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;
reply other threads:[~2005-12-11 19:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200512112034.40905.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=akpm@osdl.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=linux-kernel@vger.kernel.org \
--cc=werner@almesberger.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox