[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4962c98f-b21b-8a28-7c35-9df9cb28c857@users.sourceforge.net>
Date: Sun, 24 Jul 2016 13:51:56 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-scsi@...r.kernel.org,
Dan Williams <dan.j.williams@...el.com>,
Hannes Reinecke <hare@...e.de>,
Jack Wang <jinpu.wang@...fitbricks.com>,
"James E. J. Bottomley" <jejb@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] SCSI-aic94xx: Delete unnecessary checks before the
function call "kmem_cache_destroy"
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 17 Nov 2015 08:14:52 +0100
>
> The kmem_cache_destroy() function tests whether its argument is NULL
> and then returns immediately. Thus the test around the calls is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> drivers/scsi/aic94xx/aic94xx_init.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
> index 662b232..ab93049 100644
> --- a/drivers/scsi/aic94xx/aic94xx_init.c
> +++ b/drivers/scsi/aic94xx/aic94xx_init.c
> @@ -660,12 +660,9 @@ Err:
>
> static void asd_destroy_global_caches(void)
> {
> - if (asd_dma_token_cache)
> - kmem_cache_destroy(asd_dma_token_cache);
> + kmem_cache_destroy(asd_dma_token_cache);
> asd_dma_token_cache = NULL;
> -
> - if (asd_ascb_cache)
> - kmem_cache_destroy(asd_ascb_cache);
> + kmem_cache_destroy(asd_ascb_cache);
> asd_ascb_cache = NULL;
> }
>
>
How do you think about to integrate this update suggestion
into another source code repository?
Regards,
Markus
Powered by blists - more mailing lists