Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 05, 2007 at 09:10:01AM +0100, Rolf Eike Beer wrote:
> Ahmed S. Darwish wrote:
> > Remove unnecessary kmalloc casts in drivers/char/tty_io.c
> >
> > Signed-off-by: Ahmed Darwish <[email protected]>
> 
>   	if (!*ltp_loc) {
>  -		ltp = (struct ktermios *) kmalloc(sizeof(struct ktermios),
>  -						 GFP_KERNEL);
>  +		ltp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
>                       ^^^^^^^
>   		if (!ltp)
>   			goto free_mem_out;
>   		memset(ltp, 0, sizeof(struct ktermios));
>                 ^^^^^^ 
> kzalloc
> 
>   		if (!*o_ltp_loc) {
>  -			o_ltp = (struct ktermios *)
>  -				kmalloc(sizeof(struct ktermios), GFP_KERNEL);
>  +			o_ltp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
>                                 ^^^^^^^
>   			if (!o_ltp)
>   				goto free_mem_out;
>   			memset(o_ltp, 0, sizeof(struct ktermios));
>                         ^^^^^^
> kzalloc

Currently I'm dropping this patch and writing a big patch to remove all the 
k[mzc]alloc castings in the 20-rc3 tree as suggested by Mr. Robert Day.
I think this will be better done in another patch to let every patch do one
single thing. right ?

-- 
Ahmed S. Darwish
http://darwish-07.blogspot.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux