linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl v2 1/4] libndctl: Rename dimm property nfit_dsm_mask for generic use
@ 2021-05-17  8:42 Santosh Sivaraj
  2021-05-17  8:42 ` [ndctl v2 2/4] papr: ndtest: Enable smart test cases Santosh Sivaraj
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Santosh Sivaraj @ 2021-05-17  8:42 UTC (permalink / raw)
  To: Linux NVDIMM
  Cc: Shivaprasad G Bhat, Harish Sriram, Aneesh Kumar K.V, Shivaprasad G Bhat

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

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

end of thread, other threads:[~2021-05-17  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  8:42 [ndctl v2 1/4] libndctl: Rename dimm property nfit_dsm_mask for generic use Santosh Sivaraj
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

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).