Skip to content

Commit

Permalink
mmc: debugfs: Print ext_csd in ascending order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Venkatraman S authored and Chris Ball committed Sep 4, 2012
1 parent 211d4fe commit 6780162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/core/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6780162

Please sign in to comment.