[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211116080600.31082-1-tianjia.zhang@linux.alibaba.com>
Date: Tue, 16 Nov 2021 16:06:00 +0800
From: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kernel@...r.kernel.org
Cc: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
Subject: [PATCH] x86/lib: Eliminate compilation warnings for misc
Eliminate the following clang compilation warnings by including
necessary header files:
arch/x86/lib/misc.c:7:5: warning: no previous prototype for function 'num_digits' [-Wmissing-prototypes]
int num_digits(int val)
^
arch/x86/lib/misc.c:7:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int num_digits(int val)
^
static
Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
---
arch/x86/lib/misc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/lib/misc.c b/arch/x86/lib/misc.c
index a018ec4fba53..da8228f65455 100644
--- a/arch/x86/lib/misc.c
+++ b/arch/x86/lib/misc.c
@@ -4,6 +4,8 @@
*
* (Typed on and submitted from hpa's mobile phone.)
*/
+#include <asm/misc.h>
+
int num_digits(int val)
{
int m = 10;
--
2.32.0
Powered by blists - more mailing lists