Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3410320pxk; Mon, 21 Sep 2020 12:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX5KLc+16cSRlOIguP6phYNZ4J6e6Dyd7mmx2Rvu79rGP4mnsgULYCju72GTsJYAK+JQBZ X-Received: by 2002:aa7:d785:: with SMTP id s5mr586097edq.154.1600718355735; Mon, 21 Sep 2020 12:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600718355; cv=none; d=google.com; s=arc-20160816; b=EBffgj1XLpEXTrwEN/VBa/T19m0Jrp6vcOGDC5YIa0SqNA6sllos1lp6V9aFpBmMV6 tlpIZssCelzgU1uOynO7RsAOb7DwAy6zvpkPbRiysG/SUrhX0HyrzMovmTIpfahUYj5t 1lEAVm+/VE9xMZ+cGdn7h5Za25Js7rfrRD6xLKjyN3Yv1LSGjvR9qG3YzLOwm8e7vcUP nDLTfeSZ34/AidQ4LpNtc5K9DkTue2JyAq2Hi6e9cQfgRz8Gm2YUJdPUNzAuNhuaxt04 nl7XK68NkE0vU0yxrWA4pB6ZOTHTnb13kUBZHixftaUFHVxwDxIBtJj2idM1qredMOPz /S1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=txiUo+swEquL4u0Uv87EhcTLnau89NIdzVc6I1khIL4=; b=rhGBZj3L6F0P3lt1zDlNkImRnER8za7vWtoJefVnuK1It+Q8XqmEeEFK8OchITcQRw 6LmGL1yNXNO/cWdKNGSyRgyu9jeo2USd4zla6IK0AbM/l7Naa2t0hyXpaseZNEoJv+sl srY3oA8SEZb2a2kcgFLxJSzSWCatXADf8uQg9XscvHdg4SHntfkj6sWK/XPQL9dIgH1j XJxCLhRJnI4Ezp1H8MBWo53JoS/ejhvvKqjOL2JreQzDMwetI4MyL5AHraMGH7bkWxx/ lpuHxZ5lDOxnClgrvQQXP9ILIXihFWGGqp0+OPxNAWnJmDiiprvwCWpxuwHgt3jAML4q Z8PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=NPtQx2KG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si9300115ejy.607.2020.09.21.12.58.51; Mon, 21 Sep 2020 12:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=NPtQx2KG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728424AbgIUT4y (ORCPT + 99 others); Mon, 21 Sep 2020 15:56:54 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:44466 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728300AbgIUT4x (ORCPT ); Mon, 21 Sep 2020 15:56:53 -0400 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CEDD12D7; Mon, 21 Sep 2020 21:56:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600718211; bh=HaoTxYQD5e4vVzG+0N4ohrxKZQDQAmGxRMJB8zMf2Lw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NPtQx2KGrvekqZfHIAJiKQKpl/oVW+2sVsWCRxDBJyE8pFJE1AXRe+LxO3ME+wj3Y RHl5ca8SFozzLHBxwxas3NcRHu6xpHFQ0yPgLflfNGuZpMalYQHnXEJAsxMU2DneTX AjN2WkZaVpgfzq+l73+iaQwFkWG9pEZdbv42GzdM= Date: Mon, 21 Sep 2020 22:56:18 +0300 From: Laurent Pinchart To: "Paul E. McKenney" Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU Message-ID: <20200921195618.GB18343@pendragon.ideasonboard.com> References: <20200823030405.22174-1-laurent.pinchart@ideasonboard.com> <20200825150222.GP2855@paulmck-ThinkPad-P72> <20200825152249.GF6767@pendragon.ideasonboard.com> <20200825161629.GS2855@paulmck-ThinkPad-P72> <20200917222641.GA589@pendragon.ideasonboard.com> <20200917232416.GR29330@paulmck-ThinkPad-P72> <20200921193718.GI29330@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200921193718.GI29330@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 21, 2020 at 12:37:18PM -0700, Paul E. McKenney wrote: > On Thu, Sep 17, 2020 at 04:24:16PM -0700, Paul E. McKenney wrote: > > On Fri, Sep 18, 2020 at 01:26:41AM +0300, Laurent Pinchart wrote: > > > Hi Paul, > > > > > > On Tue, Aug 25, 2020 at 09:16:29AM -0700, Paul E. McKenney wrote: > > > > On Tue, Aug 25, 2020 at 06:22:49PM +0300, Laurent Pinchart wrote: > > > > > On Tue, Aug 25, 2020 at 08:02:22AM -0700, Paul E. McKenney wrote: > > > > > > On Sun, Aug 23, 2020 at 06:04:05AM +0300, Laurent Pinchart wrote: > > > > > > > Commit 8344496e8b49 ("rcu-tasks: Conditionally compile > > > > > > > show_rcu_tasks_gp_kthreads()") introduced conditional compilation of > > > > > > > several functions, but forgot one occurrence of > > > > > > > show_rcu_tasks_classic_gp_kthread() that causes the compiler to warn of > > > > > > > an unused static function. Fix it. > > > > > > > > > > > > > > Fixes: 8344496e8b49 ("rcu-tasks: Conditionally compile show_rcu_tasks_gp_kthreads()") > > > > > > > Signed-off-by: Laurent Pinchart > > > > > > > --- > > > > > > > kernel/rcu/tasks.h | 2 ++ > > > > > > > 1 file changed, 2 insertions(+) > > > > > > > > > > > > > > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h > > > > > > > index 835e2df8590a..bddf3968c1eb 100644 > > > > > > > --- a/kernel/rcu/tasks.h > > > > > > > +++ b/kernel/rcu/tasks.h > > > > > > > @@ -590,7 +590,9 @@ void exit_tasks_rcu_finish(void) __releases(&tasks_rcu_exit_srcu) > > > > > > > } > > > > > > > > > > > > > > #else /* #ifdef CONFIG_TASKS_RCU */ > > > > > > > +#ifndef CONFIG_TINY_RCU > > > > > > > static void show_rcu_tasks_classic_gp_kthread(void) { } > > > > > > > +#endif /* #ifndef CONFIG_TINY_RCU */ > > > > > > > void exit_tasks_rcu_start(void) { } > > > > > > > void exit_tasks_rcu_finish(void) { exit_tasks_rcu_finish_trace(current); } > > > > > > > #endif /* #else #ifdef CONFIG_TASKS_RCU */ > > > > > > > > > > > > Good catch!!! > > > > > > > > > > > > But does the following addition of "static inline" work for you? > > > > > > > > > > They do. I initially added a static inline, and realized #ifdef was used > > > > > extensively when trying to find the proper Fixes: tag, so I went for > > > > > that. I don't mind either way, as long as this gets fixed :-) > > > > > > > > This is admittedly an odd .h file, given that it is included but once. > > > > > > > > I have applied the following patch with your Reported-by, cc-ing -stable > > > > for v5.8 and later. > > > > > > I don't see the fix in Linus' master branch. Given that 8344496e8b49 was > > > introduced in v5.9-rc1, shouldn't this be treated as a regression and > > > merged before Linus releases v5.9 ? > > > > The current plan is that it goes in during the upcoming merge window, > > a few weeks from now. However, it sounds like you need it sooner. > > I will try doing a pull request and see what happens. > > And sent, CCing you. Thank you :-) > > > > > > ------------------------------------------------------------------------ > > > > > > > > > > > > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h > > > > > > index 835e2df..3dc3ffc 100644 > > > > > > --- a/kernel/rcu/tasks.h > > > > > > +++ b/kernel/rcu/tasks.h > > > > > > @@ -590,9 +590,9 @@ void exit_tasks_rcu_finish(void) __releases(&tasks_rcu_exit_srcu) > > > > > > } > > > > > > > > > > > > #else /* #ifdef CONFIG_TASKS_RCU */ > > > > > > -static void show_rcu_tasks_classic_gp_kthread(void) { } > > > > > > -void exit_tasks_rcu_start(void) { } > > > > > > -void exit_tasks_rcu_finish(void) { exit_tasks_rcu_finish_trace(current); } > > > > > > +static inline void show_rcu_tasks_classic_gp_kthread(void) { } > > > > > > +static inline void exit_tasks_rcu_start(void) { } > > > > > > +static inline void exit_tasks_rcu_finish(void) { exit_tasks_rcu_finish_trace(current); } > > > > > > #endif /* #else #ifdef CONFIG_TASKS_RCU */ > > > > > > > > > > > > #ifdef CONFIG_TASKS_RUDE_RCU -- Regards, Laurent Pinchart