Skip to contentSkip to conversation

x86/lib: Eliminate compilation warnings for misc

PATCH New Tianjia Zhang 1 participant 1 message Nov 16, 2021 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 arch/x86/lib/misc.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/lib/misc.c +2 -0
index a018ec4fba53..da8228f65455 100644
@@ -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;
Signature · 1 line
2.32.0