All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/lib: Eliminate compilation warnings for misc
@ 2021-11-16  8:06 Tianjia Zhang
  0 siblings, 0 replies; only message in thread
From: Tianjia Zhang @ 2021-11-16  8:06 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Nathan Chancellor, Nick Desaulniers,
	linux-kernel
  Cc: Tianjia Zhang

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-16  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  8:06 [PATCH] x86/lib: Eliminate compilation warnings for misc Tianjia Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.