From: Ard Biesheuvel <ardb@kernel.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: linux-efi <linux-efi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] efi/esrt: unused variable in __init efi_esrt_init
Date: Sun, 23 Feb 2020 22:24:41 +0100 [thread overview]
Message-ID: <CAKv+Gu-D5Oo0k=j33ZyfnFBBRUBfGcpJB63UZgsUyo7So6QirA@mail.gmail.com> (raw)
In-Reply-To: <20200223204557.114634-1-xypron.glpk@gmx.de>
On Sun, 23 Feb 2020 at 21:46, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Remove an unused variable in __init efi_esrt_init().
> Simplify a logical constraint.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Queued in efi/next, thanks
> ---
> drivers/firmware/efi/esrt.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c
> index 2762e0662bf4..e3d692696583 100644
> --- a/drivers/firmware/efi/esrt.c
> +++ b/drivers/firmware/efi/esrt.c
> @@ -240,7 +240,6 @@ void __init efi_esrt_init(void)
> {
> void *va;
> struct efi_system_resource_table tmpesrt;
> - struct efi_system_resource_entry_v1 *v1_entries;
> size_t size, max, entry_size, entries_size;
> efi_memory_desc_t md;
> int rc;
> @@ -288,14 +287,13 @@ void __init efi_esrt_init(void)
> memcpy(&tmpesrt, va, sizeof(tmpesrt));
> early_memunmap(va, size);
>
> - if (tmpesrt.fw_resource_version == 1) {
> - entry_size = sizeof (*v1_entries);
> - } else {
> + if (tmpesrt.fw_resource_version != 1) {
> pr_err("Unsupported ESRT version %lld.\n",
> tmpesrt.fw_resource_version);
> return;
> }
>
> + entry_size = sizeof(struct efi_system_resource_entry_v1);
> if (tmpesrt.fw_resource_count > 0 && max - size < entry_size) {
> pr_err("ESRT memory map entry can only hold the header. (max: %zu size: %zu)\n",
> max - size, entry_size);
> --
> 2.25.0
>
prev parent reply other threads:[~2020-02-23 21:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-23 20:45 [PATCH 1/1] efi/esrt: unused variable in __init efi_esrt_init Heinrich Schuchardt
2020-02-23 21:24 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKv+Gu-D5Oo0k=j33ZyfnFBBRUBfGcpJB63UZgsUyo7So6QirA@mail.gmail.com' \
--to=ardb@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).