Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3020088pxa; Tue, 25 Aug 2020 09:18:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFI4buXgkjg4ocUHYvaA3Te+g05i7yomDZ6YR4nnLACZ8nbnnB1cc7eFgKYgiZCc2jZk50 X-Received: by 2002:a17:906:388b:: with SMTP id q11mr12072308ejd.100.1598372283666; Tue, 25 Aug 2020 09:18:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598372283; cv=none; d=google.com; s=arc-20160816; b=bOLGBw4BXUdT64cuY+DjFNtLJ0dHANY4R1tHJkc4GPK6QUNHQc80vBwFFeneH+H86Z hn3Q86uaCq1akQfnadz1yib/xNjNta3xx5+n/Vsk73hINSHHJ895qCR3lwRw6uQ7UbfS eQyqlkfvkimth7VyD6Lchu+61htB/WwrpB/8s63L2UdkGe9o2iadJvgliA3w8NBn67j/ Jph3sDlWlgwdz9cCBvS9tq4XcDB6RIsh8iQFJDJitBUQ9dbPEewQO0Vv5sIldsYaFDE4 7Rqh11Dwd2BVmR2VmJ8Px7H3D5VQ++K1luQkwmRjeryElMxKHP9xjsiEk9XxQpGqDDiF hBag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Ds+VOFgwvCH1nCmaIAG9hAj7kYLe8ImURL2v7LJi+rc=; b=UfGU5MHF14R8GtprFPnfNolcqIABY/dFfvKkqqhhELn1jbA+MF3XLkAtY4D8q9IDWs dqPwX8zutRVZYokFhQj8f2yGmuMLSvX4CGks7JwFS6alW8v4qCNlhbaZFnpZyzs3IVdC cUK+vDClQxS8UdMgLf6s8OnBFcU461ynFHPS8XBLBCMPMkU94dXNpAc5/Tc4a0CIAQT2 hXnjxv4366TpnPAs4H2w3bULZyRqe8X+I2AF7/mA7Z/yVZmulY+dfFyOBTb70hZord7I ZYCzpRK+SIGJmdyIuOYdldWEYLTc2a3K+l02SrE48JwksnHawgZCIUK/fo9Xg8slMjts tiwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tFee8Fuy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si9096527eje.2.2020.08.25.09.17.40; Tue, 25 Aug 2020 09:18:03 -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 header.i=@kernel.org header.s=default header.b=tFee8Fuy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726856AbgHYQQb (ORCPT + 99 others); Tue, 25 Aug 2020 12:16:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:46366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbgHYQQ3 (ORCPT ); Tue, 25 Aug 2020 12:16:29 -0400 Received: from paulmck-ThinkPad-P72.home (unknown [50.45.173.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 698902076C; Tue, 25 Aug 2020 16:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598372189; bh=b9V0dl1ko//ynuoPQLgyZStB0kjF6te3g3DejBWyIOA=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=tFee8Fuy1b7bG+CojbKJ4OMiv7tcrY5PgH+LhfhLK6vwTFHml2Fs2rChkA/ljn0rP dhviFYu+ie1wczZEX6vm37bv3XudHLWxWvQNHbLiY1PBrCQAb6pCxApYzJraSfF5oD BTd7XtdV6A5XAx6B5CEym/Txdm0+5xynMhbjS598= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 3CF7E35226AE; Tue, 25 Aug 2020 09:16:29 -0700 (PDT) Date: Tue, 25 Aug 2020 09:16:29 -0700 From: "Paul E. McKenney" To: Laurent Pinchart 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: <20200825161629.GS2855@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200823030405.22174-1-laurent.pinchart@ideasonboard.com> <20200825150222.GP2855@paulmck-ThinkPad-P72> <20200825152249.GF6767@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825152249.GF6767@pendragon.ideasonboard.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 06:22:49PM +0300, Laurent Pinchart wrote: > Hi Paul, > > 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. Thanx, Paul > > ------------------------------------------------------------------------ > > > > 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