From: Joel Fernandes <joel@joelfernandes.org>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Josh Triplett <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
rcu@vger.kernel.org
Subject: Re: [PATCH] kvfree_rcu(): fix ifnullfree.cocci warnings
Date: Sun, 27 Sep 2020 18:55:19 -0400 [thread overview]
Message-ID: <20200927225519.GB2800828@google.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2009271458380.2839@hadrien>
On Sun, Sep 27, 2020 at 03:00:29PM +0200, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> NULL check before kfree is not needed.
>
> Generated by: scripts/coccinelle/free/ifnullfree.cocci
>
> Fixes: e9bed2a1239b ("kvfree_rcu(): Switch to kmalloc() and kfree() for allocations")
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git urezki-pcount.2020.09.26a
> head: 1a8eee1cc5b0e59c17f5d94c5871e6c70c4a43a1
> commit: e9bed2a1239b017d78cec5de66adce0560f6d077 [17/18] kvfree_rcu(): Switch to kmalloc() and kfree() for allocations
> :::::: branch date: 4 hours ago
> :::::: commit date: 15 hours ago
>
> tree.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -3165,8 +3165,7 @@ static void kfree_rcu_work(struct work_s
> bkvhead[i] = NULL;
> krc_this_cpu_unlock(krcp, flags);
>
> - if (bkvhead[i])
> - kfree(bkvhead[i]);
> + kfree(bkvhead[i]);
>
Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
thanks,
- Joel
> cond_resched_tasks_rcu_qs();
> }
next prev parent reply other threads:[~2020-09-27 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-27 13:00 [PATCH] kvfree_rcu(): fix ifnullfree.cocci warnings Julia Lawall
2020-09-27 22:55 ` Joel Fernandes [this message]
2020-09-28 14:02 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200927225519.GB2800828@google.com \
--to=joel@joelfernandes.org \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=julia.lawall@inria.fr \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).