powerpc/eeh: Show hex prefix for PE state sysfs
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Wed, 1 Oct 2014 04:34:51 +0000 (14:34 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 1 Oct 2014 12:23:34 +0000 (22:23 +1000)
As Michael suggested, the hex prefix for the output of EEH PE
state sysfs entry (/sys/bus/pci/devices/xxx/eeh_pe_state) is
always informative to users.

Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh_sysfs.c

index 9a44010bd4b5b9313f30c4f0c293c88438fa3569..f19b1e5cb06096e2bd9b68b8cd620669c8943cac 100644 (file)
@@ -65,7 +65,7 @@ static ssize_t eeh_pe_state_show(struct device *dev,
                return -ENODEV;
 
        state = eeh_ops->get_state(edev->pe, NULL);
-       return sprintf(buf, "%08x %08x\n",
+       return sprintf(buf, "%0x08x %0x08x\n",
                       state, edev->pe->state);
 }