From: Shivaprasad G Bhat <[email protected]>

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 <[email protected]>
---
 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 -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to