mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[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 <[email protected]>, Ian Molton <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Roman Zippel <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Greg KH <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Paul Fulghum <[email protected]> Cc: Alan Cox <[email protected]> Cc: Karsten Keil <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: James Bottomley <[email protected]> Cc: Ian Kent <[email protected]> Cc: Steven French <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Neil Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0743b86800
commit
5cbded585d
172 changed files with 250 additions and 250 deletions
|
|
@ -516,7 +516,7 @@ static int __init init_axis_flash(void)
|
|||
#else
|
||||
struct mtd_info *mtd_ram;
|
||||
|
||||
mtd_ram = (struct mtd_info *)kmalloc(sizeof(struct mtd_info),
|
||||
mtd_ram = kmalloc(sizeof(struct mtd_info),
|
||||
GFP_KERNEL);
|
||||
if (!mtd_ram) {
|
||||
panic("axisflashmap couldn't allocate memory for "
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ gpio_open(struct inode *inode, struct file *filp)
|
|||
if (p > GPIO_MINOR_LAST)
|
||||
return -EINVAL;
|
||||
|
||||
priv = (struct gpio_private *)kmalloc(sizeof(struct gpio_private),
|
||||
priv = kmalloc(sizeof(struct gpio_private),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!priv)
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ static int __init init_axis_flash(void)
|
|||
#else
|
||||
struct mtd_info *mtd_ram;
|
||||
|
||||
mtd_ram = (struct mtd_info *)kmalloc(sizeof(struct mtd_info),
|
||||
mtd_ram = kmalloc(sizeof(struct mtd_info),
|
||||
GFP_KERNEL);
|
||||
if (!mtd_ram) {
|
||||
panic("axisflashmap couldn't allocate memory for "
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ gpio_open(struct inode *inode, struct file *filp)
|
|||
if (p > GPIO_MINOR_LAST)
|
||||
return -EINVAL;
|
||||
|
||||
priv = (struct gpio_private *)kmalloc(sizeof(struct gpio_private),
|
||||
priv = kmalloc(sizeof(struct gpio_private),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!priv)
|
||||
|
|
|
|||
|
|
@ -686,7 +686,7 @@ keep_debug_flags(unsigned long oldccs, unsigned long oldspc,
|
|||
int __init
|
||||
cris_init_signal(void)
|
||||
{
|
||||
u16* data = (u16*)kmalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
u16* data = kmalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
|
||||
/* This is movu.w __NR_sigreturn, r9; break 13; */
|
||||
data[0] = 0x9c5f;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static int
|
|||
__init init_cris_profile(void)
|
||||
{
|
||||
struct proc_dir_entry *entry;
|
||||
sample_buffer = (char*)kmalloc(SAMPLE_BUFFER_SIZE, GFP_KERNEL);
|
||||
sample_buffer = kmalloc(SAMPLE_BUFFER_SIZE, GFP_KERNEL);
|
||||
sample_buffer_pos = sample_buffer;
|
||||
entry = create_proc_entry("system_profile", S_IWUSR | S_IRUGO, NULL);
|
||||
if (entry) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue