From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A90D5C4727F for ; Sun, 27 Sep 2020 22:55:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FE52239E5 for ; Sun, 27 Sep 2020 22:55:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="ivDpjZXA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726444AbgI0WzW (ORCPT ); Sun, 27 Sep 2020 18:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbgI0WzV (ORCPT ); Sun, 27 Sep 2020 18:55:21 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8DAC0613CE for ; Sun, 27 Sep 2020 15:55:21 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id b13so4520748qvl.2 for ; Sun, 27 Sep 2020 15:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dZEAWH40wyXTE3UOii3+/sRujYT6ubIb7i3XFgR2CP8=; b=ivDpjZXAEdfBKlKqV57ib13VDAWPON6jERKmGEPClKawcTLknEtylg6HITs+h39ij/ yqDOmIw8HPGTPu4/H1bGe6lOGJBmWm/4v4IZ5/AeqoTWoMqi0wIRnnRA/8mxNjT3ZUXG KXAq93lP0dNneFHZ4uWQcyMvfj2lx2Wa3OTWg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dZEAWH40wyXTE3UOii3+/sRujYT6ubIb7i3XFgR2CP8=; b=C6nX0C4dkY0JT4lAsOXsgFg3mWoFY5s/VWg29OF6gcitGcEDBxQtgn4yHb5PhJkNWj yzt6if3LFK9Y39SFvmjg8UhP+nwDd9FDe7lxoOl+cSkRp3QUGBjGYiiRbNjHcHHN7vVF dzQ1iG1kmeydXe08uCnLZWuue+i9AsKA7uPuOh1FMmAXeBdB/5UaEYJDF3nDOPQQKEE0 q4xMxaQAFY8ijNRnesVr1fnnBRrGikiUYYSmHMsKsuj8pc39ScmGzXI9XGdf0MbmyKTJ GSyOYg90apmRoEfr1ZpX8R6U1WWzPkamRfo0/XtZvGSY0e9tRWvk3IWzbOkeUE48j/71 TbdA== X-Gm-Message-State: AOAM5318haUuGxgfaopGVhuNsgAvjmS+zbmOZB8LTzy6tqTRUmgvTRDt 0u647kJks7fx+0aj33TF7zFZxw== X-Google-Smtp-Source: ABdhPJz+7N+M6CU2DY9sq6kbBGoQ9wSXoA5o77ldQ7Nq12zHxNr8KmPX3mvcjL33UbMtDa6Z84ktlA== X-Received: by 2002:a05:6214:929:: with SMTP id dk9mr9315766qvb.60.1601247320780; Sun, 27 Sep 2020 15:55:20 -0700 (PDT) Received: from localhost ([2620:15c:6:12:cad3:ffff:feb3:bd59]) by smtp.gmail.com with ESMTPSA id l5sm8651388qtc.28.2020.09.27.15.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 15:55:20 -0700 (PDT) Date: Sun, 27 Sep 2020 18:55:19 -0400 From: Joel Fernandes To: Julia Lawall Cc: "Paul E. McKenney" , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , rcu@vger.kernel.org Subject: Re: [PATCH] kvfree_rcu(): fix ifnullfree.cocci warnings Message-ID: <20200927225519.GB2800828@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 27, 2020 at 03:00:29PM +0200, Julia Lawall wrote: > From: kernel test robot > > 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 > Signed-off-by: Julia Lawall > --- > > 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) thanks, - Joel > cond_resched_tasks_rcu_qs(); > }