diff options
author | Robert P. J. Day <rpjday@mindspring.com> | 2006-12-13 03:35:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 12:05:58 -0500 |
commit | 5cbded585d129d0226cb48ac4202b253c781be26 (patch) | |
tree | fb24edc194a57ee81a3bf8a4dd8a95030dd0ad22 /drivers/cdrom/cdrom.c | |
parent | 0743b86800cf1dfbf96df4a438938127bbe4476c (diff) |
[PATCH] getting rid of all casts of k[cmz]alloc() calls
Run this:
#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
done
And then go through and reinstate those cases where code is casting pointers
to non-pointers.
And then drop a few hunks which conflicted with outstanding work.
Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom/cdrom.c')
-rw-r--r-- | drivers/cdrom/cdrom.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 2df5cf4ec743..e4a2f8f3a1d7 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -1810,7 +1810,7 @@ static int dvd_read_disckey(struct cdrom_device_info *cdi, dvd_struct *s) | |||
1810 | 1810 | ||
1811 | size = sizeof(s->disckey.value) + 4; | 1811 | size = sizeof(s->disckey.value) + 4; |
1812 | 1812 | ||
1813 | if ((buf = (u_char *) kmalloc(size, GFP_KERNEL)) == NULL) | 1813 | if ((buf = kmalloc(size, GFP_KERNEL)) == NULL) |
1814 | return -ENOMEM; | 1814 | return -ENOMEM; |
1815 | 1815 | ||
1816 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); | 1816 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); |
@@ -1861,7 +1861,7 @@ static int dvd_read_manufact(struct cdrom_device_info *cdi, dvd_struct *s) | |||
1861 | 1861 | ||
1862 | size = sizeof(s->manufact.value) + 4; | 1862 | size = sizeof(s->manufact.value) + 4; |
1863 | 1863 | ||
1864 | if ((buf = (u_char *) kmalloc(size, GFP_KERNEL)) == NULL) | 1864 | if ((buf = kmalloc(size, GFP_KERNEL)) == NULL) |
1865 | return -ENOMEM; | 1865 | return -ENOMEM; |
1866 | 1866 | ||
1867 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); | 1867 | init_cdrom_command(&cgc, buf, size, CGC_DATA_READ); |
@@ -2849,7 +2849,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | |||
2849 | /* FIXME: we need upper bound checking, too!! */ | 2849 | /* FIXME: we need upper bound checking, too!! */ |
2850 | if (lba < 0) | 2850 | if (lba < 0) |
2851 | return -EINVAL; | 2851 | return -EINVAL; |
2852 | cgc.buffer = (char *) kmalloc(blocksize, GFP_KERNEL); | 2852 | cgc.buffer = kmalloc(blocksize, GFP_KERNEL); |
2853 | if (cgc.buffer == NULL) | 2853 | if (cgc.buffer == NULL) |
2854 | return -ENOMEM; | 2854 | return -ENOMEM; |
2855 | memset(&sense, 0, sizeof(sense)); | 2855 | memset(&sense, 0, sizeof(sense)); |
@@ -3031,7 +3031,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | |||
3031 | int size = sizeof(dvd_struct); | 3031 | int size = sizeof(dvd_struct); |
3032 | if (!CDROM_CAN(CDC_DVD)) | 3032 | if (!CDROM_CAN(CDC_DVD)) |
3033 | return -ENOSYS; | 3033 | return -ENOSYS; |
3034 | if ((s = (dvd_struct *) kmalloc(size, GFP_KERNEL)) == NULL) | 3034 | if ((s = kmalloc(size, GFP_KERNEL)) == NULL) |
3035 | return -ENOMEM; | 3035 | return -ENOMEM; |
3036 | cdinfo(CD_DO_IOCTL, "entering DVD_READ_STRUCT\n"); | 3036 | cdinfo(CD_DO_IOCTL, "entering DVD_READ_STRUCT\n"); |
3037 | if (copy_from_user(s, (dvd_struct __user *)arg, size)) { | 3037 | if (copy_from_user(s, (dvd_struct __user *)arg, size)) { |