* [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU @ 2020-08-23 3:04 Laurent Pinchart 2020-08-25 15:02 ` Paul E. McKenney 0 siblings, 1 reply; 8+ messages in thread From: Laurent Pinchart @ 2020-08-23 3:04 UTC (permalink / raw) To: rcu; +Cc: linux-kernel, Paul E. McKenney 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 */ -- Regards, Laurent Pinchart ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 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 0 siblings, 1 reply; 8+ messages in thread From: Paul E. McKenney @ 2020-08-25 15:02 UTC (permalink / raw) To: Laurent Pinchart; +Cc: rcu, linux-kernel 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? 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 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 2020-08-25 15:02 ` Paul E. McKenney @ 2020-08-25 15:22 ` Laurent Pinchart 2020-08-25 16:16 ` Paul E. McKenney 0 siblings, 1 reply; 8+ messages in thread From: Laurent Pinchart @ 2020-08-25 15:22 UTC (permalink / raw) To: Paul E. McKenney; +Cc: rcu, linux-kernel 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 :-) > ------------------------------------------------------------------------ > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 2020-08-25 15:22 ` Laurent Pinchart @ 2020-08-25 16:16 ` Paul E. McKenney 2020-09-17 22:26 ` Laurent Pinchart 0 siblings, 1 reply; 8+ messages in thread From: Paul E. McKenney @ 2020-08-25 16:16 UTC (permalink / raw) To: Laurent Pinchart; +Cc: rcu, linux-kernel 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 2020-08-25 16:16 ` Paul E. McKenney @ 2020-09-17 22:26 ` Laurent Pinchart 2020-09-17 23:24 ` Paul E. McKenney 0 siblings, 1 reply; 8+ messages in thread From: Laurent Pinchart @ 2020-09-17 22:26 UTC (permalink / raw) To: Paul E. McKenney; +Cc: rcu, linux-kernel 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 <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. 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 ? > > > ------------------------------------------------------------------------ > > > > > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 2020-09-17 22:26 ` Laurent Pinchart @ 2020-09-17 23:24 ` Paul E. McKenney 2020-09-21 19:37 ` Paul E. McKenney 0 siblings, 1 reply; 8+ messages in thread From: Paul E. McKenney @ 2020-09-17 23:24 UTC (permalink / raw) To: Laurent Pinchart; +Cc: rcu, linux-kernel 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 <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. > > 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. 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 2020-09-17 23:24 ` Paul E. McKenney @ 2020-09-21 19:37 ` Paul E. McKenney 2020-09-21 19:56 ` Laurent Pinchart 0 siblings, 1 reply; 8+ messages in thread From: Paul E. McKenney @ 2020-09-21 19:37 UTC (permalink / raw) To: Laurent Pinchart; +Cc: rcu, linux-kernel 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 <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. > > > > 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. 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rcu-tasks: Fix compilation warning with !CONFIG_TASKS_RCU and CONFIG_TINY_RCU 2020-09-21 19:37 ` Paul E. McKenney @ 2020-09-21 19:56 ` Laurent Pinchart 0 siblings, 0 replies; 8+ messages in thread From: Laurent Pinchart @ 2020-09-21 19:56 UTC (permalink / raw) To: Paul E. McKenney; +Cc: rcu, linux-kernel 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 <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. > > > > > > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-21 19:56 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 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
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).