From c730e7dbba798b29cc5123fb01a850bd9cff9bcd Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 6 Jan 2022 13:52:07 -0800 Subject: [PATCH] ANDROID: Fix "one_thousand" defined but not used warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following warning issued when CONFIG_PERF_EVENTS is not defined: kernel/sysctl.c:124:12: error: ‘one_thousand’ defined but not used [-Werror=unused-variable] These definitions in upstream has been changed [1] and therefore the issue does not exist there. [1] https://lore.kernel.org/all/20211124220801.ip01WsWPQ%25akpm@linux-foundation.org/ Fixes: 8fded571e739 ("FROMGIT: mm/pagealloc: sysctl: change watermark_scale_factor max limit to 30%") Bug: 194652782 Signed-off-by: Suren Baghdasaryan Change-Id: I5539a2d0d27a126f7405455a8cf08c23b80d2e0b --- kernel/sysctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 28a41128fc6b..5c3030b5e719 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -121,7 +121,9 @@ static unsigned long one_ul = 1; static unsigned long long_max = LONG_MAX; static int one_hundred = 100; static int two_hundred = 200; +#ifdef CONFIG_PERF_EVENTS static int one_thousand = 1000; +#endif static int three_thousand = 3000; #ifdef CONFIG_PRINTK static int ten_thousand = 10000;