return widen_string(buf, buf - buf_start, end, spec);
 }
 
+static char *kobject_string(char *buf, char *end, void *ptr,
+                           struct printf_spec spec, const char *fmt)
+{
+       switch (fmt[1]) {
+       case 'F':
+               return device_node_string(buf, end, ptr, spec, fmt + 1);
+       }
+
+       return ptr_to_id(buf, end, ptr, spec);
+}
+
 /*
  * Show a '%p' thing.  A kernel extension is that the '%p' is followed
  * by an extra set of alphanumeric characters that are extended format
        case 'G':
                return flags_string(buf, end, ptr, fmt);
        case 'O':
-               switch (fmt[1]) {
-               case 'F':
-                       return device_node_string(buf, end, ptr, spec, fmt + 1);
-               }
-               break;
+               return kobject_string(buf, end, ptr, spec, fmt);
        case 'x':
                return pointer_string(buf, end, ptr, spec);
        }