All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: prepend 0x to hex numbers in sysfs
@ 2017-11-16 11:30 Bastian Stender
  2017-11-23 13:28 ` Ulf Hansson
  0 siblings, 1 reply; 4+ messages in thread
From: Bastian Stender @ 2017-11-16 11:30 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Shawn Lin, Adrian Hunter, Linus Walleij, Bojan Prtvar,
	Jungseung Lee, linux-mmc, kernel, Bastian Stender

The sysfs entries "pre_eol_info" and "ocr" were missing the 0x prefix
to identify them as hex formatted.

Fixes: 5fb06af7a33b ("mmc: core: Extend sysfs with OCR register")
Fixes: 46bc5c408e4e ("mmc: core: Export device lifetime information through sysfs")
Signed-off-by: Bastian Stender <bst@pengutronix.de>
---
 drivers/mmc/core/mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 36217ad5e9b1..bad5c1bf4ed9 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -780,7 +780,7 @@ MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
 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(pre_eol_info, "%02x\n", card->ext_csd.pre_eol_info);
+MMC_DEV_ATTR(pre_eol_info, "0x%02x\n", card->ext_csd.pre_eol_info);
 MMC_DEV_ATTR(life_time, "0x%02x 0x%02x\n",
 	card->ext_csd.device_life_time_est_typ_a,
 	card->ext_csd.device_life_time_est_typ_b);
@@ -790,7 +790,7 @@ MMC_DEV_ATTR(enhanced_area_offset, "%llu\n",
 MMC_DEV_ATTR(enhanced_area_size, "%u\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);
-MMC_DEV_ATTR(ocr, "%08x\n", card->ocr);
+MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
 MMC_DEV_ATTR(cmdq_en, "%d\n", card->ext_csd.cmdq_en);
 
 static ssize_t mmc_fwrev_show(struct device *dev,
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: core: prepend 0x to hex numbers in sysfs
  2017-11-16 11:30 [PATCH] mmc: core: prepend 0x to hex numbers in sysfs Bastian Stender
@ 2017-11-23 13:28 ` Ulf Hansson
       [not found]   ` <CAOmT4fTZDhaFse8TFdzeaBEfs2TF9CimN0imFB6zGZdwNwWDVQ@mail.gmail.com>
  2017-11-27 13:18   ` Bastian Stender
  0 siblings, 2 replies; 4+ messages in thread
From: Ulf Hansson @ 2017-11-23 13:28 UTC (permalink / raw)
  To: Bastian Stender
  Cc: Shawn Lin, Adrian Hunter, Linus Walleij, Bojan Prtvar,
	Jungseung Lee, linux-mmc, Sascha Hauer

On 16 November 2017 at 12:30, Bastian Stender <bst@pengutronix.de> wrote:
> The sysfs entries "pre_eol_info" and "ocr" were missing the 0x prefix
> to identify them as hex formatted.
>
> Fixes: 5fb06af7a33b ("mmc: core: Extend sysfs with OCR register")
> Fixes: 46bc5c408e4e ("mmc: core: Export device lifetime information through sysfs")
> Signed-off-by: Bastian Stender <bst@pengutronix.de>

Bastian, would you mind splitting this into two patches. I need that
to be able to add correct stable tags to each of them.

Kind regards
Uffe

> ---
>  drivers/mmc/core/mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 36217ad5e9b1..bad5c1bf4ed9 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -780,7 +780,7 @@ MMC_DEV_ATTR(manfid, "0x%06x\n", card->cid.manfid);
>  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(pre_eol_info, "%02x\n", card->ext_csd.pre_eol_info);
> +MMC_DEV_ATTR(pre_eol_info, "0x%02x\n", card->ext_csd.pre_eol_info);
>  MMC_DEV_ATTR(life_time, "0x%02x 0x%02x\n",
>         card->ext_csd.device_life_time_est_typ_a,
>         card->ext_csd.device_life_time_est_typ_b);
> @@ -790,7 +790,7 @@ MMC_DEV_ATTR(enhanced_area_offset, "%llu\n",
>  MMC_DEV_ATTR(enhanced_area_size, "%u\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);
> -MMC_DEV_ATTR(ocr, "%08x\n", card->ocr);
> +MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
>  MMC_DEV_ATTR(cmdq_en, "%d\n", card->ext_csd.cmdq_en);
>
>  static ssize_t mmc_fwrev_show(struct device *dev,
> --
> 2.11.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: core: prepend 0x to hex numbers in sysfs
       [not found]   ` <CAOmT4fTZDhaFse8TFdzeaBEfs2TF9CimN0imFB6zGZdwNwWDVQ@mail.gmail.com>
@ 2017-11-23 18:12     ` Ulf Hansson
  0 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2017-11-23 18:12 UTC (permalink / raw)
  To: bojan prtvar
  Cc: Bastian Stender, Shawn Lin, Adrian Hunter, Linus Walleij,
	Jungseung Lee, linux-mmc, Sascha Hauer

On 23 November 2017 at 15:22, bojan prtvar <prtvar.b@gmail.com> wrote:
>
>
> On Thu, Nov 23, 2017 at 2:28 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On 16 November 2017 at 12:30, Bastian Stender <bst@pengutronix.de> wrote:
>> > The sysfs entries "pre_eol_info" and "ocr" were missing the 0x prefix
>> > to identify them as hex formatted.
>> >
>> > Fixes: 5fb06af7a33b ("mmc: core: Extend sysfs with OCR register")
>> > Fixes: 46bc5c408e4e ("mmc: core: Export device lifetime information
>> > through sysfs")
>> > Signed-off-by: Bastian Stender <bst@pengutronix.de>
>>
>> Bastian, would you mind splitting this into two patches. I need that
>> to be able to add correct stable tags to each of them.
>>
>> Kind regards
>> Uffe
>
>
>
> For the OCR part, maybe we should change the drivers/mmc/core/sd.c as well.

Yeah, makes sense. Please post a patch. :-)

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: core: prepend 0x to hex numbers in sysfs
  2017-11-23 13:28 ` Ulf Hansson
       [not found]   ` <CAOmT4fTZDhaFse8TFdzeaBEfs2TF9CimN0imFB6zGZdwNwWDVQ@mail.gmail.com>
@ 2017-11-27 13:18   ` Bastian Stender
  1 sibling, 0 replies; 4+ messages in thread
From: Bastian Stender @ 2017-11-27 13:18 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Shawn Lin, linux-mmc, Adrian Hunter, Sascha Hauer, Bojan Prtvar,
	Linus Walleij, Jungseung Lee

On 11/23/2017 02:28 PM, Ulf Hansson wrote:
> On 16 November 2017 at 12:30, Bastian Stender <bst@pengutronix.de> wrote:
>> The sysfs entries "pre_eol_info" and "ocr" were missing the 0x prefix
>> to identify them as hex formatted.
>>
>> Fixes: 5fb06af7a33b ("mmc: core: Extend sysfs with OCR register")
>> Fixes: 46bc5c408e4e ("mmc: core: Export device lifetime information through sysfs")
>> Signed-off-by: Bastian Stender <bst@pengutronix.de>
> 
> Bastian, would you mind splitting this into two patches. I need that
> to be able to add correct stable tags to each of them.

Sure, will send v2.

Regards,
Bastian

-- 
Pengutronix e.K.
Industrial Linux Solutions
http://www.pengutronix.de/
Peiner Str. 6-8, 31137 Hildesheim, Germany
Amtsgericht Hildesheim, HRA 2686

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-27 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 11:30 [PATCH] mmc: core: prepend 0x to hex numbers in sysfs Bastian Stender
2017-11-23 13:28 ` Ulf Hansson
     [not found]   ` <CAOmT4fTZDhaFse8TFdzeaBEfs2TF9CimN0imFB6zGZdwNwWDVQ@mail.gmail.com>
2017-11-23 18:12     ` Ulf Hansson
2017-11-27 13:18   ` Bastian Stender

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.