diff --git a/lib/vsprintf.c b/lib/vsprintf.c index b71f713a7665..630d42636dcf 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1708,7 +1708,7 @@ static int __init initialize_ptr_random(void) } early_initcall(initialize_ptr_random); -int ptr_to_hashval(const void *ptr, unsigned long *hashval_out) +static inline int __ptr_to_hashval(const void *ptr, unsigned long *hashval_out) { unsigned long hashval; @@ -1729,6 +1729,11 @@ int ptr_to_hashval(const void *ptr, unsigned long *hashval_out) return 0; } +int ptr_to_hashval(const void *ptr, unsigned long *hashval_out) +{ + return __ptr_to_hashval(ptr, hashval_out); +} + /* Maps a pointer to a 32 bit unique identifier. */ static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec) { @@ -1742,7 +1747,7 @@ static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec) return pointer_string(buf, end, (const void *)hashval, spec); } - ret = ptr_to_hashval(ptr, &hashval); + ret = __ptr_to_hashval(ptr, &hashval); if (ret) { spec.field_width = 2 * sizeof(ptr); /* string length must be less than default_width */