Ahmed S. Darwish wrote: > Hi all, > This is a patch to remove the unneeded k[mzc]alloc casts in the whole > 2.6.20-rc3 tree. I tried to put this patch in a patchset but I couldn't > cause the modified files have nothing in common (except the unneeded casts > ofcourse). > > This patch includes http://lkml.org/lkml/fancy/2007/1/5/12 and > http://lkml.org/lkml/2007/1/5/6. > > Signed-off-by: Ahmed Darwish > > diff --git a/arch/cris/arch-v32/mm/intmem.c > b/arch/cris/arch-v32/mm/intmem.c index 41ee7f7..acb4e21 100644 > --- a/arch/cris/arch-v32/mm/intmem.c > +++ b/arch/cris/arch-v32/mm/intmem.c > @@ -27,8 +27,8 @@ static void crisv32_intmem_init(void) > { > static int initiated = 0; > if (!initiated) { > - struct intmem_allocation* alloc = > - (struct intmem_allocation*)kmalloc(sizeof *alloc, GFP_KERNEL); > + struct intmem_allocation* alloc = kmalloc(sizeof *alloc, > + GFP_KERNEL); sizeof(*alloc) (see Documentation/CodingStyle)
There are some more of this kind. Eike
pgpr2XMlyB2V2.pgp
Description: PGP signature