All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/scsi/megaraid/megaraid_sas_fusion.c:3921:3-8: WARNING: NULL check before some freeing functions is not needed.
@ 2020-12-11  4:11 kernel test robot
  2020-12-11  4:11 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2020-12-11  4:11 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   33dc9614dc208291d0c4bcdeb5d30d481dcd2c4c
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 coccinelle: ifnullfree: add vfree(), kvfree*() functions
date:   3 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 3 months ago
config: i386-randconfig-c001-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/scsi/megaraid/megaraid_sas_fusion.c:3921:3-8: WARNING: NULL check before some freeing functions is not needed.

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38798 bytes --]

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

* [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings
  2020-12-11  4:11 drivers/scsi/megaraid/megaraid_sas_fusion.c:3921:3-8: WARNING: NULL check before some freeing functions is not needed kernel test robot
@ 2020-12-11  4:11 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-12-11  4:11 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Kashyap Desai <kashyap.desai@broadcom.com>
CC: Sumit Saxena <sumit.saxena@broadcom.com>
CC: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
CC: "James E.J. Bottomley" <jejb@linux.ibm.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: megaraidlinux.pdl(a)broadcom.com
CC: linux-scsi(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/scsi/megaraid/megaraid_sas_fusion.c:3921:3-8: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 5e0c074e5b4b ("coccinelle: ifnullfree: add vfree(), kvfree*() functions")
CC: Denis Efremov <efremov@linux.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   33dc9614dc208291d0c4bcdeb5d30d481dcd2c4c
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 3 hours ago
:::::: commit date: 3 months ago

Please take the patch only if it's a positive warning. Thanks!

 megaraid_sas_fusion.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3917,8 +3917,7 @@ megasas_free_host_crash_buffer(struct me
 {
 	unsigned int i;
 	for (i = 0; i < instance->drv_buf_alloc; i++) {
-		if (instance->crash_buf[i])
-			vfree(instance->crash_buf[i]);
+		vfree(instance->crash_buf[i]);
 	}
 	instance->drv_buf_index = 0;
 	instance->drv_buf_alloc = 0;

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

* [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings
  2020-10-26 17:14 drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed kernel test robot
@ 2020-10-26 17:14 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-10-26 17:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Lucas Stach <l.stach@pengutronix.de>
CC: Russell King <linux+etnaviv@armlinux.org.uk>
CC: Christian Gmeiner <christian.gmeiner@gmail.com>
CC: David Airlie <airlied@linux.ie>
CC: Daniel Vetter <daniel@ffwll.ch>
CC: etnaviv(a)lists.freedesktop.org
CC: dri-devel(a)lists.freedesktop.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 5e0c074e5b4b ("coccinelle: ifnullfree: add vfree(), kvfree*() functions")
CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3650b228f83adda7e5ee532e2b90429c03f7b9ec
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 19 hours ago
:::::: commit date: 8 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 etnaviv_gem_prime.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
@@ -77,8 +77,7 @@ static void etnaviv_gem_prime_release(st
 	/* Don't drop the pages for imported dmabuf, as they are not
 	 * ours, just free the array we allocated:
 	 */
-	if (etnaviv_obj->pages)
-		kvfree(etnaviv_obj->pages);
+	kvfree(etnaviv_obj->pages);
 
 	drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt);
 }

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

* [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings
  2020-10-02 19:44 [jlawall:for-5.10 4/10] drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some freeing functions is not needed kernel test robot
  2020-10-02 19:44 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot
  2020-10-02 19:44 ` kernel test robot
@ 2020-10-02 19:44 ` kernel test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-10-02 19:44 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Dave Young <dyoung@redhat.com>
CC: Baoquan He <bhe@redhat.com>
CC: Vivek Goyal <vgoyal@redhat.com>
CC: Alexey Dobriyan <adobriyan@gmail.com>
CC: kexec(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org
CC: linux-fsdevel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

fs/proc/vmcore.c:1507:2-7: WARNING: NULL check before some freeing functions is not needed.
fs/proc/vmcore.c:1510:2-7: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 5e0c074e5b4b ("coccinelle: ifnullfree: add vfree(), kvfree*() functions")
CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git for-5.10
head:   44d8870f21529cfa8f50b503b5d949c6d46e6fc1
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 [4/10] coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 24 hours ago
:::::: commit date: 4 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 vmcore.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -1503,11 +1503,9 @@ int vmcore_add_device_dump(struct vmcore
 	return 0;
 
 out_err:
-	if (buf)
-		vfree(buf);
+	vfree(buf);
 
-	if (dump)
-		vfree(dump);
+	vfree(dump);
 
 	return ret;
 }

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

* [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings
  2020-10-02 19:44 [jlawall:for-5.10 4/10] drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some freeing functions is not needed kernel test robot
  2020-10-02 19:44 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot
@ 2020-10-02 19:44 ` kernel test robot
  2020-10-02 19:44 ` kernel test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-10-02 19:44 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Chris Mason <chris.mason@fusionio.com>
CC: Josef Bacik <josef@toxicpanda.com>
CC: David Sterba <dsterba@suse.com>
CC: linux-btrfs(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

fs/btrfs/raid56.c:237:2-8: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 5e0c074e5b4b ("coccinelle: ifnullfree: add vfree(), kvfree*() functions")
CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git for-5.10
head:   44d8870f21529cfa8f50b503b5d949c6d46e6fc1
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 [4/10] coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 24 hours ago
:::::: commit date: 4 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 raid56.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -233,8 +233,7 @@ int btrfs_alloc_stripe_hash_table(struct
 	}
 
 	x = cmpxchg(&info->stripe_hash_table, NULL, table);
-	if (x)
-		kvfree(x);
+	kvfree(x);
 	return 0;
 }
 

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

* [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings
  2020-10-02 19:44 [jlawall:for-5.10 4/10] drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some freeing functions is not needed kernel test robot
@ 2020-10-02 19:44 ` kernel test robot
  2020-10-02 19:44 ` kernel test robot
  2020-10-02 19:44 ` kernel test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-10-02 19:44 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Matias Bjorling <mb@lightnvm.io>
CC: linux-block(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 5e0c074e5b4b ("coccinelle: ifnullfree: add vfree(), kvfree*() functions")
CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git for-5.10
head:   44d8870f21529cfa8f50b503b5d949c6d46e6fc1
commit: 5e0c074e5b4be02d57d1b60abc3391afe7edd088 [4/10] coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 24 hours ago
:::::: commit date: 4 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 pblk-gc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- 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);
 }
 

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

* [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings
  2020-09-02 19:40 [jlawall:for-5.10 5/5] drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed kernel test robot
@ 2020-09-02 19:41 ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-09-02 19:41 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Lucas Stach <l.stach@pengutronix.de>
CC: Russell King <linux+etnaviv@armlinux.org.uk>
CC: Christian Gmeiner <christian.gmeiner@gmail.com>
CC: David Airlie <airlied@linux.ie>
CC: Daniel Vetter <daniel@ffwll.ch>
CC: etnaviv(a)lists.freedesktop.org
CC: dri-devel(a)lists.freedesktop.org
CC: linux-kernel(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

Fixes: 5f80f474a2c3 ("coccinelle: ifnullfree: add vfree(), kvfree*() functions")
CC: Denis Efremov <efremov@linux.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux.git for-5.10
head:   5f80f474a2c330a8e8e30e844f1a06811f082963
commit: 5f80f474a2c330a8e8e30e844f1a06811f082963 [5/5] coccinelle: ifnullfree: add vfree(), kvfree*() functions
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago

Please take the patch only if it's a positive warning. Thanks!

 etnaviv_gem_prime.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
@@ -77,8 +77,7 @@ static void etnaviv_gem_prime_release(st
 	/* Don't drop the pages for imported dmabuf, as they are not
 	 * ours, just free the array we allocated:
 	 */
-	if (etnaviv_obj->pages)
-		kvfree(etnaviv_obj->pages);
+	kvfree(etnaviv_obj->pages);
 
 	drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt);
 }

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

end of thread, other threads:[~2020-12-11  4:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  4:11 drivers/scsi/megaraid/megaraid_sas_fusion.c:3921:3-8: WARNING: NULL check before some freeing functions is not needed kernel test robot
2020-12-11  4:11 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-10-26 17:14 drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed kernel test robot
2020-10-26 17:14 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot
2020-10-02 19:44 [jlawall:for-5.10 4/10] drivers/lightnvm/pblk-gc.c:27:2-7: WARNING: NULL check before some freeing functions is not needed kernel test robot
2020-10-02 19:44 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot
2020-10-02 19:44 ` kernel test robot
2020-10-02 19:44 ` kernel test robot
2020-09-02 19:40 [jlawall:for-5.10 5/5] drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:81:2-8: WARNING: NULL check before some freeing functions is not needed kernel test robot
2020-09-02 19:41 ` [PATCH] coccinelle: ifnullfree: fix ifnullfree.cocci warnings kernel test robot

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.