FROMLIST: rcu-tasks: Fix build error

Fixing below build error that got exposed by 'commit 824c55581d
("UPSTREAM: Enable '-Werror' by default for all kernel builds")'
by making show_rcu_tasks_rude_gp_kthread() function as 'inline'.

 In file included from kernel/rcu/update.c:579:0:
 kernel/rcu/tasks.h:710:13: error: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Werror=unused-function]
  static void show_rcu_tasks_rude_gp_kthread(void) {}

All warnings are treated as errors after picking upstream
'commit 824c55581d ("UPSTREAM: Enable '-Werror' by default
for all kernel builds")' into android[12/13]-5.10 kernels.
In latest Linux kernels this issue won't exist as problematic code got
modified by 'commit 27c0f1448389 ("rcutorture: Make grace-period kthread
report match RCU flavor being tested")'.

Even though buggy code present in 5.10 stable kernel, the
'commit 824c55581d ("UPSTREAM: Enable '-Werror' by default for all
kernel builds")' is not present so this fix is not relevant here
and got rejected by community.

Bug: 269057599
Link: https://lore.kernel.org/stable/1676916839-32235-1-git-send-email-quic_c_spathi@quicinc.com/
Fixes: 824c55581d ("UPSTREAM: Enable '-Werror' by default for all kernel builds")
Change-Id: I95f6a7a81883d7a6b0f56068b1eb49dc02788685
Signed-off-by: Srinivasarao Pathipati <quic_spathi@quicinc.com>
This commit is contained in:
Srinivasarao Pathipati 2023-02-15 18:46:45 +05:30 committed by Treehugger Robot
parent 7fd4fbe615
commit b086cc7361

View File

@ -707,7 +707,7 @@ static void show_rcu_tasks_rude_gp_kthread(void)
#endif /* #ifndef CONFIG_TINY_RCU */
#else /* #ifdef CONFIG_TASKS_RUDE_RCU */
static void show_rcu_tasks_rude_gp_kthread(void) {}
static inline void show_rcu_tasks_rude_gp_kthread(void) {}
#endif /* #else #ifdef CONFIG_TASKS_RUDE_RCU */
////////////////////////////////////////////////////////////////////////