From: Dave Jiang <dave.jiang@intel.com>
To: dan.j.williams@intel.com
Cc: dan.carpenter@oracle.com, linux-nvdimm@lists.01.org
Subject: [PATCH] libnvdimm: remove used code in nd_pmem_forget_poison_check()
Date: Mon, 30 Oct 2017 11:17:26 -0700 [thread overview]
Message-ID: <150938744600.18848.5814902918600734916.stgit@djiang5-desk3.ch.intel.com> (raw)
Dan Carpenter reported:
The patch 006358b35c73: "libnvdimm: add support for clear poison list
and badblocks for device dax" from Apr 7, 2017, leads to the
following static checker warning:
drivers/nvdimm/bus.c:852 nd_pmem_forget_poison_check()
warn: we tested 'nd_dax' before and it was 'false'
Remove unused code.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
drivers/nvdimm/bus.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index baf2839..c042174 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -849,13 +849,11 @@ static int nd_pmem_forget_poison_check(struct device *dev, void *data)
start = clear_err->address;
end = clear_err->address + clear_err->cleared - 1;
- if (nd_btt || nd_pfn || nd_dax) {
+ if (nd_btt || nd_pfn) {
if (nd_btt)
ndns = nd_btt->ndns;
else if (nd_pfn)
ndns = nd_pfn->ndns;
- else if (nd_dax)
- ndns = nd_dax->nd_pfn.ndns;
if (!ndns)
return 0;
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
reply other threads:[~2017-10-30 18:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=150938744600.18848.5814902918600734916.stgit@djiang5-desk3.ch.intel.com \
--to=dave.jiang@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.org \
/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 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.