aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2023-08-14 19:33:44 +0300
committerAndrew Morton <[email protected]>2023-08-21 13:46:24 -0700
commit665536092355f17f0e2ea291eec70f9787dccd32 (patch)
tree0829eccf95ccfb66da826049593088cdda143b9e /include/linux
parent39ced19b9e60f6f5b80db6b72965a8cf1982439d (diff)
lib/vsprintf: declare no_hash_pointers in sprintf.h
Sparse is not happy to see non-static variable without declaration: lib/vsprintf.c:61:6: warning: symbol 'no_hash_pointers' was not declared. Should it be static? Declare respective variable in the sprintf.h. With this, add a comment to discourage its use if no real need. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Marco Elver <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: Steven Rostedt (Google) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sprintf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sprintf.h b/include/linux/sprintf.h
index 9ca23bcf9f42..33dcbec71925 100644
--- a/include/linux/sprintf.h
+++ b/include/linux/sprintf.h
@@ -20,6 +20,8 @@ __printf(2, 0) const char *kvasprintf_const(gfp_t gfp, const char *fmt, va_list
__scanf(2, 3) int sscanf(const char *, const char *, ...);
__scanf(2, 0) int vsscanf(const char *, const char *, va_list);
+/* These are for specific cases, do not use without real need */
+extern bool no_hash_pointers;
int no_hash_pointers_enable(char *str);
#endif /* _LINUX_KERNEL_SPRINTF_H */