[PATCH] x86/lib: Eliminate compilation warnings for misc

From: Tianjia Zhang
Date: Tue Nov 16 2021 - 03:06:28 EST


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@xxxxxxxxxxxxxxxxx>
---
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