From: Santosh Sivaraj <santosh@fossix.org>
To: Linux NVDIMM <linux-nvdimm@lists.01.org>
Cc: Shivaprasad G Bhat <sbhat@linux.ibm.com>,
Harish Sriram <harish@linux.ibm.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Subject: [ndctl v2 1/4] libndctl: Rename dimm property nfit_dsm_mask for generic use
Date: Mon, 17 May 2021 14:12:56 +0530 [thread overview]
Message-ID: <20210517084259.181236-1-santosh@fossix.org> (raw)
From: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
The dimm specific dsm masks can be used by different platforms.
Rename it to dsm_mask to avoid confusion.
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
---
ndctl/lib/libndctl.c | 4 ++--
ndctl/lib/private.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
Resending both the SMART test and error injection patches as one series. Will be
easier for review and testing.
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index bf0968c..a148438 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -1728,7 +1728,7 @@ static int populate_dimm_attributes(struct ndctl_dimm *dimm,
sprintf(path, "%s/%s/dsm_mask", dimm_base, bus_prefix);
if (sysfs_read_attr(ctx, path, buf) == 0)
- dimm->nfit_dsm_mask = strtoul(buf, NULL, 0);
+ dimm->dsm_mask = strtoul(buf, NULL, 0);
sprintf(path, "%s/%s/format", dimm_base, bus_prefix);
if (sysfs_read_attr(ctx, path, buf) == 0)
@@ -1821,7 +1821,7 @@ static void *add_dimm(void *parent, int id, const char *dimm_base)
dimm->manufacturing_date = -1;
dimm->manufacturing_location = -1;
dimm->cmd_family = -1;
- dimm->nfit_dsm_mask = ULONG_MAX;
+ dimm->dsm_mask = ULONG_MAX;
for (i = 0; i < formats; i++)
dimm->format[i] = -1;
diff --git a/ndctl/lib/private.h b/ndctl/lib/private.h
index 8f4510e..53fae0f 100644
--- a/ndctl/lib/private.h
+++ b/ndctl/lib/private.h
@@ -68,7 +68,7 @@ struct ndctl_dimm {
unsigned char manufacturing_location;
unsigned long cmd_family;
unsigned long cmd_mask;
- unsigned long nfit_dsm_mask;
+ unsigned long dsm_mask;
long long dirty_shutdown;
enum ndctl_fwa_state fwa_state;
enum ndctl_fwa_result fwa_result;
@@ -105,9 +105,9 @@ enum dsm_support {
static inline enum dsm_support test_dimm_dsm(struct ndctl_dimm *dimm, int fn)
{
- if (dimm->nfit_dsm_mask == ULONG_MAX) {
+ if (dimm->dsm_mask == ULONG_MAX) {
return DIMM_DSM_UNKNOWN;
- } else if (dimm->nfit_dsm_mask & (1 << fn))
+ } else if (dimm->dsm_mask & (1 << fn))
return DIMM_DSM_SUPPORTED;
return DIMM_DSM_UNSUPPORTED;
}
--
2.31.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next reply other threads:[~2021-05-17 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 8:42 Santosh Sivaraj [this message]
2021-05-17 8:42 ` [ndctl v2 2/4] papr: ndtest: Enable smart test cases Santosh Sivaraj
2021-05-17 8:42 ` [ndctl v2 3/4] inject-error: Remove assumptions on error injection support Santosh Sivaraj
2021-05-17 8:42 ` [ndctl v2 4/4] Error injection support for PAPR Santosh Sivaraj
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=20210517084259.181236-1-santosh@fossix.org \
--to=santosh@fossix.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=harish@linux.ibm.com \
--cc=linux-nvdimm@lists.01.org \
--cc=sbhat@linux.ibm.com \
--cc=sbhat@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).