diff mbox

[1/3] pmem: clarify a debug print in pmem_clear_poison

Message ID 1468889100-30698-2-git-send-email-vishal.l.verma@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Verma, Vishal L July 19, 2016, 12:44 a.m. UTC
Prefix the sector number being cleared with a '0x' to make it clear that
this is a hex value.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 drivers/nvdimm/pmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dan Williams July 19, 2016, 3:53 p.m. UTC | #1
On Mon, Jul 18, 2016 at 5:44 PM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> Prefix the sector number being cleared with a '0x' to make it clear that
> this is a hex value.
>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
>  drivers/nvdimm/pmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> index 608fc44..29ab25b 100644
> --- a/drivers/nvdimm/pmem.c
> +++ b/drivers/nvdimm/pmem.c
> @@ -57,7 +57,7 @@ static void pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
>         cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset, len);
>
>         if (cleared > 0 && cleared / 512) {
> -               dev_dbg(dev, "%s: %llx clear %ld sector%s\n",
> +               dev_dbg(dev, "%s: 0x%llx clear %ld sector%s\n",

%#llx is a bit smaller / more readable.  Shall I just fix this up on applying?
Verma, Vishal L July 19, 2016, 5:15 p.m. UTC | #2
On Tue, 2016-07-19 at 08:53 -0700, Dan Williams wrote:
> On Mon, Jul 18, 2016 at 5:44 PM, Vishal Verma <vishal.l.verma@intel.co

> m> wrote:

> > Prefix the sector number being cleared with a '0x' to make it clear

> > that

> > this is a hex value.

> > 

> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>

> > ---

> >  drivers/nvdimm/pmem.c | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> > 

> > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c

> > index 608fc44..29ab25b 100644

> > --- a/drivers/nvdimm/pmem.c

> > +++ b/drivers/nvdimm/pmem.c

> > @@ -57,7 +57,7 @@ static void pmem_clear_poison(struct pmem_device

> > *pmem, phys_addr_t offset,

> >         cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset,

> > len);

> > 

> >         if (cleared > 0 && cleared / 512) {

> > -               dev_dbg(dev, "%s: %llx clear %ld sector%s\n",

> > +               dev_dbg(dev, "%s: 0x%llx clear %ld sector%s\n",

> 

> %#llx is a bit smaller / more readable.  Shall I just fix this up on

> applying?


TIL :) Yes you can do the fixup, thanks!
Verma, Vishal L July 19, 2016, 5:56 p.m. UTC | #3
On 07/19, Verma, Vishal L wrote:
> On Tue, 2016-07-19 at 08:53 -0700, Dan Williams wrote:
> > On Mon, Jul 18, 2016 at 5:44 PM, Vishal Verma <vishal.l.verma@intel.co
> > m> wrote:
> > > Prefix the sector number being cleared with a '0x' to make it clear
> > > that
> > > this is a hex value.
> > > 
> > > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> > > ---
> > >  drivers/nvdimm/pmem.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> > > index 608fc44..29ab25b 100644
> > > --- a/drivers/nvdimm/pmem.c
> > > +++ b/drivers/nvdimm/pmem.c
> > > @@ -57,7 +57,7 @@ static void pmem_clear_poison(struct pmem_device
> > > *pmem, phys_addr_t offset,
> > >         cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset,
> > > len);
> > > 
> > >         if (cleared > 0 && cleared / 512) {
> > > -               dev_dbg(dev, "%s: %llx clear %ld sector%s\n",
> > > +               dev_dbg(dev, "%s: 0x%llx clear %ld sector%s\n",
> > 
> > %#llx is a bit smaller / more readable.  Shall I just fix this up on
> > applying?
> 
> TIL :) Yes you can do the fixup, thanks!

Or since I'm reworking the other two, I'lll fix this up too.

> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
diff mbox

Patch

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 608fc44..29ab25b 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -57,7 +57,7 @@  static void pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
 	cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset, len);
 
 	if (cleared > 0 && cleared / 512) {
-		dev_dbg(dev, "%s: %llx clear %ld sector%s\n",
+		dev_dbg(dev, "%s: 0x%llx clear %ld sector%s\n",
 				__func__, (unsigned long long) sector,
 				cleared / 512, cleared / 512 > 1 ? "s" : "");
 		badblocks_clear(&pmem->bb, sector, cleared / 512);