* [PATCH] lightnvm: fix unnecessary NULL check warnings
@ 2021-02-02 1:41 Tian Tao
2021-02-02 1:47 ` Chaitanya Kulkarni
0 siblings, 1 reply; 5+ messages in thread
From: Tian Tao @ 2021-02-02 1:41 UTC (permalink / raw)
To: mb; +Cc: linux-block
Remove NULL checks before vfree() to fix these warnings:
./drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some
freeing functions is not needed.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/lightnvm/pblk-gc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
index 2581eeb..b31658b 100644
--- a/drivers/lightnvm/pblk-gc.c
+++ b/drivers/lightnvm/pblk-gc.c
@@ -23,8 +23,7 @@
static void pblk_gc_free_gc_rq(struct pblk_gc_rq *gc_rq)
{
- if (gc_rq->data)
- vfree(gc_rq->data);
+ vfree(gc_rq->data);
kfree(gc_rq);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] lightnvm: fix unnecessary NULL check warnings
2021-02-02 1:41 [PATCH] lightnvm: fix unnecessary NULL check warnings Tian Tao
@ 2021-02-02 1:47 ` Chaitanya Kulkarni
2021-02-02 16:00 ` Matias Bjørling
0 siblings, 1 reply; 5+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-02 1:47 UTC (permalink / raw)
To: Tian Tao, mb; +Cc: linux-block
On 2/1/21 17:44, Tian Tao wrote:
> Remove NULL checks before vfree() to fix these warnings:
> ./drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some
> freeing functions is not needed.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lightnvm: fix unnecessary NULL check warnings
2021-02-02 1:47 ` Chaitanya Kulkarni
@ 2021-02-02 16:00 ` Matias Bjørling
2021-02-02 17:24 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Matias Bjørling @ 2021-02-02 16:00 UTC (permalink / raw)
To: Chaitanya Kulkarni, Tian Tao; +Cc: linux-block
On 02/02/2021 02.47, Chaitanya Kulkarni wrote:
> On 2/1/21 17:44, Tian Tao wrote:
>> Remove NULL checks before vfree() to fix these warnings:
>> ./drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some
>> freeing functions is not needed.
>>
>> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Looks good.
>
> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
>
Thanks, Tian and Chaitanya. I'll queue it up.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lightnvm: fix unnecessary NULL check warnings
2021-02-02 16:00 ` Matias Bjørling
@ 2021-02-02 17:24 ` Christoph Hellwig
2021-02-02 18:38 ` Matias Bjørling
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2021-02-02 17:24 UTC (permalink / raw)
To: Matias Bj??rling; +Cc: Chaitanya Kulkarni, Tian Tao, linux-block
On Tue, Feb 02, 2021 at 05:00:34PM +0100, Matias Bj??rling wrote:
> Thanks, Tian and Chaitanya. I'll queue it up.
Didn't we plan to kill off lightnvm?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lightnvm: fix unnecessary NULL check warnings
2021-02-02 17:24 ` Christoph Hellwig
@ 2021-02-02 18:38 ` Matias Bjørling
0 siblings, 0 replies; 5+ messages in thread
From: Matias Bjørling @ 2021-02-02 18:38 UTC (permalink / raw)
To: Christoph Hellwig, Jens Axboe; +Cc: Chaitanya Kulkarni, Tian Tao, linux-block
On 02/02/2021 18.24, Christoph Hellwig wrote:
> On Tue, Feb 02, 2021 at 05:00:34PM +0100, Matias Bj??rling wrote:
>> Thanks, Tian and Chaitanya. I'll queue it up.
> Didn't we plan to kill off lightnvm?
I haven't got a clear signal from Jens for me to go ahead and submit a
patch to remove it, or if we wanted to first deprecate it, and then
remove after it has been deprecated for a while.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-02 18:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 1:41 [PATCH] lightnvm: fix unnecessary NULL check warnings Tian Tao
2021-02-02 1:47 ` Chaitanya Kulkarni
2021-02-02 16:00 ` Matias Bjørling
2021-02-02 17:24 ` Christoph Hellwig
2021-02-02 18:38 ` Matias Bjørling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.