devio: add 32bit pointer support
authorAlan Cox <alan@linux.intel.com>
Tue, 30 Aug 2016 20:06:03 +0000 (21:06 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 30 Aug 2016 20:06:03 +0000 (21:06 +0100)
This means we need a new % code for printk and to stop misusing %x for pointers. Add %p

Kernel/devio.c

index cf1ca19..b03cbd0 100644 (file)
@@ -566,7 +566,9 @@ void kprintf(const char *fmt, ...)
                                        fmt++;
                                        continue;
                                }
-
+#ifdef CONFIG_32BIT
+                               case 'p':
+#endif
                                case 'l': /* assume an x is following */
                                {
                                        long l = va_arg(ap, unsigned long);
@@ -577,6 +579,9 @@ void kprintf(const char *fmt, ...)
                                        continue;
                                }
 
+#ifndef CONFIG_32BIT
+                               case 'p':
+#endif
                                case 'x':
                                case 'd':
                                case 'u':