From patchwork Fri Aug 17 18:52:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 1339341 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7EA00DF280 for ; Fri, 17 Aug 2012 18:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433Ab2HQSxg (ORCPT ); Fri, 17 Aug 2012 14:53:36 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55033 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932379Ab2HQSxd (ORCPT ); Fri, 17 Aug 2012 14:53:33 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7HIrWBT028053; Fri, 17 Aug 2012 13:53:32 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7HIrW1s022857; Fri, 17 Aug 2012 13:53:32 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Fri, 17 Aug 2012 13:53:32 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7HIrWuw019638; Fri, 17 Aug 2012 13:53:32 -0500 Received: from localhost (h83-3.vpn.ti.com [172.24.83.3]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q7HIrTr11024; Fri, 17 Aug 2012 13:53:29 -0500 (CDT) From: Venkatraman S To: , CC: , , , Venkatraman S Subject: [PATCH 02/10] mmc: debugfs: Print ext_csd in ascending order Date: Sat, 18 Aug 2012 00:22:22 +0530 Message-ID: <1345229550-8672-3-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.11.1.25.g0e18bef In-Reply-To: <1345229550-8672-1-git-send-email-svenkatr@ti.com> References: <1345229550-8672-1-git-send-email-svenkatr@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- drivers/mmc/core/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 9ab5b17..d96c643 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c @@ -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);