[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200818170337.805624-1-alex.dewar90@gmail.com>
Date: Tue, 18 Aug 2020 18:03:36 +0100
From: Alex Dewar <alex.dewar90@...il.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Cc: Alex Dewar <alex.dewar90@...il.com>
Subject: [PATCH] sched/cputime: Mark function as __maybe_unused
Depending on config options, account_other_time() may not be called
anywhere. Add __maybe_unused flag to fix clang warning.
Signed-off-by: Alex Dewar <alex.dewar90@...il.com>
---
kernel/sched/cputime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 5a55d2300452..43ede0d6661c 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -252,7 +252,7 @@ static __always_inline u64 steal_account_process_time(u64 maxtime)
/*
* Account how much elapsed time was spent in steal, irq, or softirq time.
*/
-static inline u64 account_other_time(u64 max)
+static inline u64 __maybe_unused account_other_time(u64 max)
{
u64 accounted;
--
2.28.0
Powered by blists - more mailing lists