<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 06/30/2018 08:55 AM, Alex Hung
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1530320156-8606-4-git-send-email-alex.hung@canonical.com">
      <pre wrap="">Signed-off-by: Alex Hung <a class="moz-txt-link-rfc2396E" href="mailto:alex.hung@canonical.com"><alex.hung@canonical.com></a>
---
 src/dmi/dmicheck/dmicheck.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 522f590..b508799 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1345,17 +1345,13 @@ static void dmicheck_entry(fwts_framework *fw,
                                        "field '%s', offset 0x%2.2x",
                                        data[0x5], table, addr, "Slot Type", 0x5);
                        dmi_min_max_uint8_check(fw, table, addr, "Slot Data Bus Width", hdr, 0x6, 0x1, 0xe);
-                       dmi_min_max_uint8_check(fw, table, addr, "Current Usage", hdr, 0x7, 0x1, 0x4);
+                       dmi_min_max_uint8_check(fw, table, addr, "Current Usage", hdr, 0x7, 0x1, 0x5);
                        dmi_min_max_uint8_check(fw, table, addr, "Slot Length", hdr, 0x8, 0x1, 0x6);
                        if (hdr->length < 0x0d)
                                break;
-                       if (data[0xc] & 0xf8)
-                               fwts_failed(fw, LOG_LEVEL_MEDIUM, DMI_RESERVED_VALUE_USED,
-                                       "Reserved bits 0x%2.2" PRIx8 " was used"
-                                       "bits 3..7 would be reserved while accessing entry '%s' @ "
-                                       "0x%8.8" PRIx32 ", field '%s', offset 0x%2.2x",
-                                       data[0xc],
-                                       table, addr, "Slot Characteristics 2", 0xc);
+
+                       dmi_reserved_bits_check(fw, table, addr, "Slot Characteristics 2", hdr, sizeof(uint8_t), 0x0c, 4, 7);
+
                        if (hdr->length < 0x11)
                                break;
                        if (!((data[0x5] == 0x06) ||
</pre>
    </blockquote>
    Acked-by: Ivan Hu <a class="moz-txt-link-rfc2396E"
      href="mailto:ivan.hu@canonical.com"><ivan.hu@canonical.com></a>
  </body>
</html>