diff options
author | Jean Delvare <jdelvare@suse.de> | 2020-10-14 14:15:58 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2020-10-14 14:15:58 +0200 |
commit | 4d8df5fcfb4d792521e70ac2c7abc6e1bbaec7f8 (patch) | |
tree | 398ffa2e77359bd73f427f40b6b734fce1463aa2 /dmidecode.c | |
parent | 92853b621ff72e3ba87e0ed7675d2103d05b8d3c (diff) | |
download | dmidecode-git-4d8df5fcfb4d792521e70ac2c7abc6e1bbaec7f8.tar.gz |
Revert "fix: Memory Technology <OUT OF SPEC> when slot is empty"
This reverts commit 92853b621ff72e3ba87e0ed7675d2103d05b8d3c.
This is not a bug in dmidecode. It is the BIOS' responsibility to encode
the memory technology to 0x02 for "Unknown" when a slot is not in use.
Diffstat (limited to 'dmidecode.c')
-rw-r--r-- | dmidecode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/dmidecode.c b/dmidecode.c index cfdd2cb..cf32821 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -2695,7 +2695,7 @@ static void dmi_memory_device_speed(const char *attr, u16 code) pr_attr(attr, "%u MT/s", code); } -static void dmi_memory_technology(u8 code, u16 size) +static void dmi_memory_technology(u8 code) { /* 7.18.6 */ static const char * const technology[] = { @@ -2707,9 +2707,7 @@ static void dmi_memory_technology(u8 code, u16 size) "NVDIMM-P", "Intel Optane DC persistent memory" /* 0x07 */ }; - if ( size == 0) - pr_attr("Memory Technology", "No Module Installed"); - else if (code >= 0x01 && code <= 0x07) + if (code >= 0x01 && code <= 0x07) pr_attr("Memory Technology", "%s", technology[code - 0x01]); else pr_attr("Memory Technology", "%s", out_of_spec); @@ -4482,7 +4480,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver) dmi_memory_voltage_value("Configured Voltage", WORD(data + 0x26)); if (h->length < 0x34) break; - dmi_memory_technology(data[0x28],WORD(data + 0x0C)); + dmi_memory_technology(data[0x28]); dmi_memory_operating_mode_capability(WORD(data + 0x29)); pr_attr("Firmware Version", "%s", dmi_string(h, data[0x2B])); |