All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip: core/rcu] kvfree_rcu(): Fix ifnullfree.cocci warnings
@ 2020-10-09 17:01 tip-bot2 for kernel test robot
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for kernel test robot @ 2020-10-09 17:01 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Joel Fernandes (Google),
	kernel test robot, Julia Lawall, Paul E. McKenney, x86, LKML

The following commit has been merged into the core/rcu branch of tip:

Commit-ID:     849b9c5446ccb0c98c7b11c69f169d22777ab31b
Gitweb:        https://git.kernel.org/tip/849b9c5446ccb0c98c7b11c69f169d22777ab31b
Author:        kernel test robot <lkp@intel.com>
AuthorDate:    Sun, 27 Sep 2020 15:00:29 +02:00
Committer:     Paul E. McKenney <paulmck@kernel.org>
CommitterDate: Thu, 01 Oct 2020 09:07:24 -07:00

kvfree_rcu(): Fix ifnullfree.cocci warnings

NULL check before kfree is not needed.

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

Fixes: 16a6320addfc ("rcu/tree: Allocate a page when caller is preemptible")
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/tree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 39ac930..09dfd03 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3165,8 +3165,7 @@ static void kfree_rcu_work(struct work_struct *work)
 				bkvhead[i] = NULL;
 			krc_this_cpu_unlock(krcp, flags);
 
-			if (bkvhead[i])
-				kfree(bkvhead[i]);
+			kfree(bkvhead[i]);
 
 			cond_resched_tasks_rcu_qs();
 		}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-09 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 17:01 [tip: core/rcu] kvfree_rcu(): Fix ifnullfree.cocci warnings tip-bot2 for 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.