login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
August
»
30
Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver
view
thread
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Daniel Drake
Subject:
Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver
Date: Thursday, August 30, 2007 - 10:54 am
Jesper Juhl wrote:
quoted text
> Since kmalloc() returns a void pointer there is no reason to cast > its return value. > This patch also removes a pointless initialization of a variable.
NAK: adds a sparse warning zd_chip.c:116:15: warning: implicit cast to nocast type
quoted text
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> > --- > drivers/net/wireless/zd1211rw/zd_chip.c | 5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c > index c39f198..4942e5c 100644 > --- a/drivers/net/wireless/zd1211rw/zd_chip.c > +++ b/drivers/net/wireless/zd1211rw/zd_chip.c > @@ -106,8 +106,8 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr > { > int r; > int i; > - zd_addr_t *a16 = (zd_addr_t *)NULL; > u16 *v16; > + zd_addr_t *a16; > unsigned int count16; > > if (count > USB_MAX_IOREAD32_COUNT) > @@ -115,8 +115,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr > > /* Allocate a single memory block for values and addresses. */ > count16 = 2*count; > - a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), > - GFP_KERNEL); > + a16 = kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), GFP_KERNEL); > if (!a16) { > dev_dbg_f(zd_chip_dev(chip), > "error ENOMEM in allocation of a16\n");
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: [PATCH 13/30] net: Don't do pointless kmalloc return v ...
, Daniel Drake
, (Thu Aug 30, 10:54 am)
Re: [PATCH 13/30] net: Don't do pointless kmalloc return v ...
, Jesper Juhl
, (Thu Aug 30, 1:20 pm)
Re: [PATCH 13/30] net: Don't do pointless kmalloc return v ...
, Joe Perches
, (Thu Aug 30, 3:19 pm)
[PATCH] Don't needlessly initialize variable to NULL in zd ...
, Jesper Juhl
, (Thu Aug 30, 3:30 pm)
Re: [PATCH] Don't needlessly initialize variable to NULL i ...
, Randy Dunlap
, (Thu Aug 30, 3:42 pm)
Re: [PATCH] Don't needlessly initialize variable to NULL i ...
, Jesper Juhl
, (Thu Aug 30, 4:04 pm)
Re: [PATCH 13/30] net: Don't do pointless kmalloc return v ...
, Daniel Drake
, (Thu Aug 30, 4:47 pm)
Re: [PATCH 13/30] net: Don't do pointless kmalloc return v ...
, Herbert Xu
, (Fri Aug 31, 2:30 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Hugh Dickins
Re: Linux 2.6.26-rc1 - pgtable_32.c:178 pmd_bad
Bernhard Beck
[PATCH 001/001] usb-serial: Add ThinkOptics WavIT
Oleg Nesterov
Re: [PATCH 4/5] don't panic if /sbin/init exits or killed
Greg KH
[patch 07/21] rtc-pcf8563: detect polarity of century bit automatically
git
:
Jonathan del Strother
Re: [PATCH] Fixing path quoting issues
Gerrit Pape
[PATCH] fix skipping merge-order test with NO_OPENSSL=1.
Linus Torvalds
Re: Implementing branch attributes in git config
Johannes Schindelin
Re: Trying to use git-filter-branch to compress history by removing large, obsolet...
Gerrit Pape
[PATCH] hooks--update: fix test for properly set up project description file
linux-netdev
:
David Miller
Re: [PATCH 04/15] tg3: Preserve LAA when device control is released
Jean-Louis Dupond
Re: tg3 driver not advertising 1000mbit
Sven Wegener
[PATCH] ipvs: Add missing locking during connection table hashing and unhashing
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
Stephen Hemminger
[PATCH 2/2] sky2: fix transmit state on resume
git-commits-head
:
Linux Kernel Mailing List
[SCSI] scsi ioctl: fix kernel-doc warning
Linux Kernel Mailing List
ALSA: HDA - Correct trivial typos in comments.
Linux Kernel Mailing List
i2c-viapro: Add support for SMBus Process Call transactions
Linux Kernel Mailing List
i2c: Documentation: upgrading clients HOWTO
Linux Kernel Mailing List
[PATCH] fix sysctl_nr_open bugs
openbsd-misc
:
Die Gestalt
Re: How to re-build openssl with SHA1 support?
Edwin Eyan Moragas
Re: managing routes for multiple PPPoE connections
Brian Candler
Re: OBSD's perspective on SELinux
Jonathan Schleifer
Why is getaddrinfo breaking POSIX?
Predrag Punosevac
Re: Kernel developers guide/tutorial
Colocation donated by:
Syndicate