LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts
@ 2007-01-06 13:17 Ahmed S. Darwish
  2007-01-21 22:56 ` Steven French
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmed S. Darwish @ 2007-01-06 13:17 UTC (permalink / raw)
  To: sfrench; +Cc: linux-kernel

Hi, 
A patch to remove two unnecessary kzalloc casts found

Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts
  2007-01-06 13:17 [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts Ahmed S. Darwish
@ 2007-01-21 22:56 ` Steven French
  0 siblings, 0 replies; 2+ messages in thread
From: Steven French @ 2007-01-21 22:56 UTC (permalink / raw)
  To: Ahmed S. Darwish; +Cc: linux-kernel, sfrench

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" <darwish.07@gmail.com> wrote on 01/06/2007 07:17:44 AM:

> Hi, 
> A patch to remove two unnecessary kzalloc casts found
> 
> Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>
> 
> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-06 13:17 [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts Ahmed S. Darwish
2007-01-21 22:56 ` Steven French

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lkml.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lkml.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lkml.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lkml.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lkml.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lkml.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lkml.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lkml.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lkml.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lkml.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lkml.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lkml.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git