public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: "Verma, Vishal L" <vishal.l.verma@intel.com>,
	"Williams, Dan J" <dan.j.williams@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"Busch, Keith" <keith.busch@intel.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"Weiny, Ira" <ira.weiny@intel.com>
Subject: Re: [RESEND PATCH] nvdimm: fix some compilation warnings
Date: Wed, 26 Jun 2019 17:00:28 -0400	[thread overview]
Message-ID: <1561582828.5154.83.camel@lca.pw> (raw)
In-Reply-To: <cd6db786ff5758914c77add4d7a9391886038c84.camel@intel.com>

On Thu, 2019-05-16 at 00:29 +0000, Verma, Vishal L wrote:
> On Wed, 2019-05-15 at 17:26 -0700, Dan Williams wrote:
> > On Wed, May 15, 2019 at 5:25 PM Verma, Vishal L
> > <vishal.l.verma@intel.com> wrote:
> > > On Wed, 2019-05-15 at 16:25 -0700, Dan Williams wrote:
> > > > > diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> > > > > index 4671776f5623..9f02a99cfac0 100644
> > > > > --- a/drivers/nvdimm/btt.c
> > > > > +++ b/drivers/nvdimm/btt.c
> > > > > @@ -1269,11 +1269,9 @@ static int btt_read_pg(struct btt *btt,
> > > > > struct bio_integrity_payload *bip,
> > > > > 
> > > > >                 ret = btt_data_read(arena, page, off, postmap,
> > > > > cur_len);
> > > > >                 if (ret) {
> > > > > -                       int rc;
> > > > > -
> > > > >                         /* Media error - set the e_flag */
> > > > > -                       rc = btt_map_write(arena, premap,
> > > > > postmap, 0, 1,
> > > > > -                               NVDIMM_IO_ATOMIC);
> > > > > +                       btt_map_write(arena, premap, postmap, 0,
> > > > > 1,
> > > > > +                                     NVDIMM_IO_ATOMIC);
> > > > >                         goto out_rtt;
> > > > 
> > > > This doesn't look correct to me, shouldn't we at least be logging
> > > > that
> > > > the bad-block failed to be persistently tracked?
> > > 
> > > Yes logging it sounds good to me. Qian, can you include this in your
> > > respin or shall I send a fix for it separately (since we were always
> > > ignoring the failure here regardless of this patch)?
> > 
> > I think a separate fix for this makes more sense. Likely also needs to
> > be a ratelimited message in case a storm of errors is encountered.
> 
> Yes good point on rate limiting - I was thinking WARN_ONCE but that
> might mask errors for distinct blocks, but a rate limited printk should
> work best. I'll prepare a patch.
> 

Verma, are you still working on this? I can still see this warning in the latest
linux-next.

drivers/nvdimm/btt.c: In function 'btt_read_pg':
drivers/nvdimm/btt.c:1272:8: warning: variable 'rc' set but not used
[-Wunused-but-set-variable]


  reply	other threads:[~2019-06-26 21:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 15:07 [RESEND PATCH] nvdimm: fix some compilation warnings Qian Cai
2019-05-15 23:25 ` Dan Williams
2019-05-16  0:25   ` Verma, Vishal L
2019-05-16  0:26     ` Dan Williams
2019-05-16  0:29       ` Verma, Vishal L
2019-06-26 21:00         ` Qian Cai [this message]
2019-06-26 21:43           ` Verma, Vishal L
2019-05-16  0:31   ` Qian Cai
2019-05-16  0:34   ` Qian Cai

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=1561582828.5154.83.camel@lca.pw \
    --to=cai@lca.pw \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.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