]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mmc: debugfs: Print ext_csd in ascending order
authorVenkatraman S <svenkatr@ti.com>
Tue, 7 Aug 2012 13:59:06 +0000 (19:29 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 4 Sep 2012 17:58:21 +0000 (13:58 -0400)
ext_csd exported through debugfs is printed in reverse order (from
byte 511 to 0), which causes confusion.
Fix the for loop to print ext_csd in natural order.

Signed-off-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/debugfs.c

index 9ab5b17d488ae45f63756a43bfe8917e88b52e86..d96c643dde1c1b38eeeeaa0504d92f2d960b4088 100644 (file)
@@ -281,7 +281,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp)
        if (err)
                goto out_free;
 
-       for (i = 511; i >= 0; i--)
+       for (i = 0; i < 512; i++)
                n += sprintf(buf + n, "%02x", ext_csd[i]);
        n += sprintf(buf + n, "\n");
        BUG_ON(n != EXT_CSD_STR_LEN);