lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/lib: Eliminate compilation warnings for misc
Date
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@linux.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
\
 
 \ /
  Last update: 2021-11-16 09:08    [W:0.062 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site