Subject: [PATCH] cfi: print size in human readable format

Franck Jullien franck.jullien at gmail.com
Tue Sep 23 00:02:37 PDT 2014


From: Franck Jullien <franck.jullien at gmail.com>

The CFI size is now printed in a human readable format.
It also adds "0x" prefix to the printed address.

Signed-off-by: Franck Jullien <franck.jullien at gmail.com>
---
 drivers/mtd/nor/cfi_flash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c
index a494063..0fa41bf 100644
--- a/drivers/mtd/nor/cfi_flash.c
+++ b/drivers/mtd/nor/cfi_flash.c
@@ -1000,8 +1000,8 @@ static int cfi_probe (struct device_d *dev)
                return -ENODEV;
        }

-       dev_info(dev, "found cfi flash at %p, size %ld\n",
-                       info->base, info->size);
+       dev_info(dev, "found cfi flash at 0x%p, size %s\n",
+                       info->base, size_human_readable(info->size));

        dev->info = cfi_info;

-- 
2.1.0



More information about the barebox mailing list