public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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
Date: Tue, 25 Aug 2020 09:16:29 -0700	[thread overview]
Message-ID: <20200825161629.GS2855@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200825152249.GF6767@pendragon.ideasonboard.com>

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 <laurent.pinchart@ideasonboard.com>
> > > ---
> > >  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

  reply	other threads:[~2020-08-25 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-23  3:04 [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU Laurent Pinchart
2020-08-25 15:02 ` Paul E. McKenney
2020-08-25 15:22   ` Laurent Pinchart
2020-08-25 16:16     ` Paul E. McKenney [this message]
2020-09-17 22:26       ` Laurent Pinchart
2020-09-17 23:24         ` Paul E. McKenney
2020-09-21 19:37           ` Paul E. McKenney
2020-09-21 19:56             ` Laurent Pinchart

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=20200825161629.GS2855@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcu@vger.kernel.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