From b086cc7361c3f485f9d2bfdc1c955c67262cc919 Mon Sep 17 00:00:00 2001 From: Srinivasarao Pathipati Date: Wed, 15 Feb 2023 18:46:45 +0530 Subject: [PATCH] FROMLIST: rcu-tasks: Fix build error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixing below build error that got exposed by 'commit 824c55581dde ("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 824c55581dde ("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 824c55581dde ("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: 824c55581dde ("UPSTREAM: Enable '-Werror' by default for all kernel builds") Change-Id: I95f6a7a81883d7a6b0f56068b1eb49dc02788685 Signed-off-by: Srinivasarao Pathipati --- kernel/rcu/tasks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 8b51e6a5b386..53ddb4e1a2cb 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -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 */ ////////////////////////////////////////////////////////////////////////