]> Pileus Git - ~andy/linux/blobdiff - lib/vsprintf.c
Merge 3.9-rc7 into staging-next
[~andy/linux] / lib / vsprintf.c
index fab33a9c5318b297e5d4077b8bb3f3261312ee1e..0d62fd700f6893c9de2ae96bec1b6bb95531f5d6 100644 (file)
@@ -1030,6 +1030,7 @@ int kptr_restrict __read_mostly;
  *              N no separator
  *            The maximum supported length is 64 bytes of the input. Consider
  *            to use print_hex_dump() for the larger input.
+ * - 'a' For a phys_addr_t type and its derivative types (passed by reference)
  *
  * Note: The difference between 'S' and 'F' is that on ia64 and ppc64
  * function pointers are really function descriptors, which contain a
@@ -1120,6 +1121,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
                        return netdev_feature_string(buf, end, ptr, spec);
                }
                break;
+       case 'a':
+               spec.flags |= SPECIAL | SMALL | ZEROPAD;
+               spec.field_width = sizeof(phys_addr_t) * 2 + 2;
+               spec.base = 16;
+               return number(buf, end,
+                             (unsigned long long) *((phys_addr_t *)ptr), spec);
        }
        spec.flags |= SMALL;
        if (spec.field_width == -1) {