From patchwork Sun Oct 14 20:32:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 191409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id B490B2C009B for ; Mon, 15 Oct 2012 07:32:34 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TNUrR-0006DF-HC; Sun, 14 Oct 2012 20:32:33 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TNUrM-0006An-An for fwts-devel@lists.ubuntu.com; Sun, 14 Oct 2012 20:32:28 +0000 Received: from cpc3-craw6-2-0-cust180.croy.cable.virginmedia.com ([77.100.248.181] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TNUrM-0003sR-7I for fwts-devel@lists.ubuntu.com; Sun, 14 Oct 2012 20:32:28 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 18/26] bios: dmi_decode: remove redundant parameters from helper functions Date: Sun, 14 Oct 2012 21:32:10 +0100 Message-Id: <1350246738-31699-19-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350246738-31699-1-git-send-email-colin.king@canonical.com> References: <1350246738-31699-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Functions dmi_uuid_check and dmi_scan_tables have redundant parameters so remove them. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Keng-Yu Lin --- src/dmi/dmi_decode/dmi_decode.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/dmi/dmi_decode/dmi_decode.c b/src/dmi/dmi_decode/dmi_decode.c index f502713..ca307ef 100644 --- a/src/dmi/dmi_decode/dmi_decode.c +++ b/src/dmi/dmi_decode/dmi_decode.c @@ -405,8 +405,7 @@ static void dmi_uuid_check(fwts_framework *fw, uint32_t addr, const char *field, const fwts_dmi_header *hdr, - uint8_t offset, - uint16_t version) + uint8_t offset) { char guid_str[37]; int i; @@ -434,8 +433,7 @@ static void dmi_uuid_check(fwts_framework *fw, static void dmi_decode_entry(fwts_framework *fw, uint32_t addr, - const fwts_dmi_header *hdr, - uint16_t version) + const fwts_dmi_header *hdr) { uint8_t *ptr; uint8_t count; @@ -473,7 +471,7 @@ static void dmi_decode_entry(fwts_framework *fw, dmi_str_check(fw, table, addr, "Serial Number", hdr, 0x7); if (hdr->length < 0x19) break; - dmi_uuid_check(fw, table, addr, "UUID", hdr, 0x8, version); + dmi_uuid_check(fw, table, addr, "UUID", hdr, 0x8); dmi_min_max_uint8_check(fw, table, addr, "Wakeup Type", hdr, 0x18, 0x0, 0x08); if (hdr->length < 0x1b) break; @@ -1178,8 +1176,7 @@ static int dmi_version_check(fwts_framework *fw, uint16_t version) static void dmi_scan_tables(fwts_framework *fw, fwts_smbios_entry *entry, - uint8_t *table, - uint16_t version) + uint8_t *table) { uint8_t *entry_data = table; uint16_t table_length; @@ -1226,7 +1223,7 @@ static void dmi_scan_tables(fwts_framework *fw, next_entry += 2; if ((next_entry - table) <= table_length) - dmi_decode_entry(fw, addr, &hdr, version); + dmi_decode_entry(fw, addr, &hdr); i++; entry_data = next_entry; @@ -1280,7 +1277,7 @@ static int dmi_decode_test1(fwts_framework *fw) return FWTS_ERROR; } - dmi_scan_tables(fw, &entry, table, version); + dmi_scan_tables(fw, &entry, table); (void)fwts_munmap(table, (size_t)entry.struct_table_length);