aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <[email protected]>2018-10-11 10:42:47 +0200
committerPetr Mladek <[email protected]>2018-10-12 11:14:07 +0200
commitf31b224c14fdf97ea371d52de9a26ad246820fb4 (patch)
treeccb9713f8187a9e63d785a486b5cd5c34868b300
parenta06b0c82a049d34d4dc273e8692ed0894458c468 (diff)
lib/vsprintf: Make ptr argument conts in ptr_to_id()
Make the ptr argument const to avoid adding casts in future callers. Link: http://lkml.kernel.org/r/[email protected] To: "Tobin C . Harding" <[email protected]> To: Andrew Morton <[email protected]> To: Jonathan Corbet <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> [[email protected]: split into separate patch] Signed-off-by: Petr Mladek <[email protected]>
-rw-r--r--lib/vsprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index d5b3a3f95c01..c40fdabbd592 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1709,7 +1709,8 @@ static int __init initialize_ptr_random(void)
early_initcall(initialize_ptr_random);
/* Maps a pointer to a 32 bit unique identifier. */
-static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec)
+static char *ptr_to_id(char *buf, char *end, const void *ptr,
+ struct printf_spec spec)
{
const char *str = sizeof(ptr) == 8 ? "(____ptrval____)" : "(ptrval)";
unsigned long hashval;