From: Beata Baranowska <beatax.baranowska@intel.com>
To: ulf.hansson@linaro.org, adrian.hunter@intel.com,
aisheng.dong@nxp.com, wsa+renesas@sang-engineering.com,
gwendal@chromium.org, chaotian.jing@mediatek.com,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: sebastianx.jarosz@intel.com, beatax.baranowska@intel.com,
Chuanxiao Dong <chuanxiao.dong@intel.com>
Subject: [PATCH] mmc: Change the enhanced area related sysfs output format
Date: Tue, 14 Jun 2016 10:33:06 +0200 [thread overview]
Message-ID: <1465893186-6399-1-git-send-email-beatax.baranowska@intel.com> (raw)
From: Chuanxiao Dong <chuanxiao.dong@intel.com>
When the enhanced area feature was not enabled, the related sysfs will
have -EINVAL(-22) value, so change the sysfs output format to display
the correct value.
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
---
drivers/mmc/core/mmc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 5d438ad3ee32..cc55253a5d47 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -722,9 +722,10 @@ MMC_DEV_ATTR(name, "%s\n", card->cid.prod_name);
MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid);
MMC_DEV_ATTR(prv, "0x%x\n", card->cid.prv);
MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial);
-MMC_DEV_ATTR(enhanced_area_offset, "%llu\n",
+MMC_DEV_ATTR(enhanced_area_offset, "%lld\n",
card->ext_csd.enhanced_area_offset);
-MMC_DEV_ATTR(enhanced_area_size, "%u\n", card->ext_csd.enhanced_area_size);
+MMC_DEV_ATTR(enhanced_area_size, "%d KBytes\n",
+ card->ext_csd.enhanced_area_size);
MMC_DEV_ATTR(raw_rpmb_size_mult, "%#x\n", card->ext_csd.raw_rpmb_size_mult);
MMC_DEV_ATTR(rel_sectors, "%#x\n", card->ext_csd.rel_sectors);
--
next reply other threads:[~2016-06-14 8:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 8:33 Beata Baranowska [this message]
2016-06-14 10:12 ` [PATCH] mmc: Change the enhanced area related sysfs output format Wolfram Sang
2016-06-14 10:36 ` Adrian Hunter
2016-06-14 12:41 ` Wolfram Sang
2016-06-20 9:25 ` Baranowska, BeataX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465893186-6399-1-git-send-email-beatax.baranowska@intel.com \
--to=beatax.baranowska@intel.com \
--cc=adrian.hunter@intel.com \
--cc=aisheng.dong@nxp.com \
--cc=chaotian.jing@mediatek.com \
--cc=chuanxiao.dong@intel.com \
--cc=gwendal@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=sebastianx.jarosz@intel.com \
--cc=ulf.hansson@linaro.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox