From patchwork Wed Mar 22 14:26:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 13184163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5240C6FD1F for ; Wed, 22 Mar 2023 14:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cJbBCd7H0cEFCjrznuH/UeV5CZlosATCnTMlR2gpwmE=; b=Lq6sSiddscRmyk /q9z2XjA0CuunyKpxSKGrjDn2P06b6HJ66C3gQ5WUcUJfWXJtv3YFuNITM2nbK99YsFfq8LIj7qTS tdo2WEc/+6S5AICFUvJi62hS4ZxKjoQ9PhvIv1mjaYpIzG0PyCnMVMc0Vy8MIk2vzCKdY1vMecRh7 e7X+G1mWGNl2dlLp2yMB6dIn2ohJjGfMWt071cspMoYYh2JQIUlfO5bKjfR/M0TF9/5jIhmSeakuO 0HRI0KXayVjav17aU0MC0O+XPxyokACRlFtLBGZsvRPQM/t66RMZXOE8oBfugnpgxYEurYdXR0CTS tT58w8NPB5IGGdX5brJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pezQO-00GHsv-1X; Wed, 22 Mar 2023 14:26:48 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pezQB-00GHoT-0i for linux-arm-kernel@lists.infradead.org; Wed, 22 Mar 2023 14:26:39 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CED3662152; Wed, 22 Mar 2023 14:26:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16655C4339B; Wed, 22 Mar 2023 14:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679495194; bh=6MMyawK3cuIV7u8JeTYNZqikb/f8vmsPIr1K+3RBRFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z72X9xlk4EjMWDlKIxQ4vWUXJ/1DffqbFdJnm1cblCGuojcGuhDi2oms3g1ltElJC kHqAO4A2hPndgLVgP6bjoqnEiFvzShJFkEpFr3ZYZ+vEug8WeC7lkeXGshKuYgATTh 5/Aw4Fj2Y1fDH8czqFFNu7+VV9IieJMr5nMyX7UKHsCJ42IP+NHb1XJm7jAIFe5do5 mazkflleRh6pvL597lL7A/ew843BinCNTQkBuHiqQ59sfMGgF2fXrgH3M5RffltR1Y 4wI8zMig7xBWF6TX2XgNo43ANUSQBOBJmtOPbE1oqtSujDVix+/q0HxGXPJxV4filL N4r0grBNklIRg== From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Darren Hart , Andrea Righi Subject: [PATCH 3/3] efi/libstub: smbios: Drop unused 'recsize' parameter Date: Wed, 22 Mar 2023 15:26:21 +0100 Message-Id: <20230322142621.3685058-4-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230322142621.3685058-1-ardb@kernel.org> References: <20230322142621.3685058-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1759; i=ardb@kernel.org; h=from:subject; bh=6MMyawK3cuIV7u8JeTYNZqikb/f8vmsPIr1K+3RBRFg=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIUVagNdnz6RVvJeW5QU9cU8LOp/CcntS4a1NK/x27O58m B98U/d7RykLgxgHg6yYIovA7L/vdp6eKFXrPEsWZg4rE8gQBi5OAZjIPEGG/xmXE/YsMGw2f7D4 1w/9lifKhSvc9tvNF4xZzbg8y3j/7gsM/9MCOvQmPpi97z3bC93aoOYU7U9Lixvct4o/LRF+vnh 5Ph8A X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230322_072635_340273_6EF92FB7 X-CRM114-Status: GOOD ( 12.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We no longer use the recsize argument for locating the string table in an SMBIOS record, so we can drop it from the internal API. Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/efistub.h | 5 ++--- drivers/firmware/efi/libstub/smbios.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index 330565b9263a6b01..bd9c38a93bbce09c 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -1122,14 +1122,13 @@ struct efi_smbios_type4_record { }; #define efi_get_smbios_string(__record, __type, __name) ({ \ - int size = sizeof(struct efi_smbios_type ## __type ## _record); \ int off = offsetof(struct efi_smbios_type ## __type ## _record, \ __name); \ - __efi_get_smbios_string((__record), __type, off, size); \ + __efi_get_smbios_string((__record), __type, off); \ }) const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record, - u8 type, int offset, int recsize); + u8 type, int offset); void efi_remap_image(unsigned long image_base, unsigned alloc_size, unsigned long code_size); diff --git a/drivers/firmware/efi/libstub/smbios.c b/drivers/firmware/efi/libstub/smbios.c index f9c159c28f4613f8..c217de2cc8d56dc2 100644 --- a/drivers/firmware/efi/libstub/smbios.c +++ b/drivers/firmware/efi/libstub/smbios.c @@ -38,7 +38,7 @@ const struct efi_smbios_record *efi_get_smbios_record(u8 type) } const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record, - u8 type, int offset, int recsize) + u8 type, int offset) { const u8 *strtable;