Re: [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts

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

 



thx - I have added these to the cifs git tree.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com

"Ahmed S. Darwish" <[email protected]> wrote on 01/06/2007 07:17:44 AM:

> Hi, 
> A patch to remove two unnecessary kzalloc casts found
> 
> Signed-off-by: Ahmed Darwish <[email protected]>
> 
> diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
> index aedf683..90f95ed 100644
> --- a/fs/cifs/misc.c
> +++ b/fs/cifs/misc.c
> @@ -71,9 +71,7 @@ sesInfoAlloc(void)
>  {
>     struct cifsSesInfo *ret_buf;
> 
> -   ret_buf =
> -       (struct cifsSesInfo *) kzalloc(sizeof (struct cifsSesInfo),
> -                  GFP_KERNEL);
> +   ret_buf = kzalloc(sizeof (struct cifsSesInfo), GFP_KERNEL);
>     if (ret_buf) {
>        write_lock(&GlobalSMBSeslock);
>        atomic_inc(&sesInfoAllocCount);
> @@ -109,9 +107,8 @@ struct cifsTconInfo *
>  tconInfoAlloc(void)
>  {
>     struct cifsTconInfo *ret_buf;
> -   ret_buf =
> -       (struct cifsTconInfo *) kzalloc(sizeof (struct cifsTconInfo),
> -                   GFP_KERNEL);
> +   ret_buf = kzalloc(sizeof (struct cifsTconInfo),
> +           GFP_KERNEL);
>     if (ret_buf) {
>        write_lock(&GlobalSMBSeslock);
>        atomic_inc(&tconInfoAllocCount);
> 
> -- 
> 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