Skip to content

Commit f31b224

Browse files
geertupmladek
authored andcommitted
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/20181011084249.4520-2-geert+renesas@glider.be To: "Tobin C . Harding" <me@tobin.cc> To: Andrew Morton <akpm@linux-foundation.org> To: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> [pmladek@suse.com: split into separate patch] Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent a06b0c8 commit f31b224

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/vsprintf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,8 @@ static int __init initialize_ptr_random(void)
17091709
early_initcall(initialize_ptr_random);
17101710

17111711
/* Maps a pointer to a 32 bit unique identifier. */
1712-
static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec)
1712+
static char *ptr_to_id(char *buf, char *end, const void *ptr,
1713+
struct printf_spec spec)
17131714
{
17141715
const char *str = sizeof(ptr) == 8 ? "(____ptrval____)" : "(ptrval)";
17151716
unsigned long hashval;

0 commit comments

Comments
 (0)