linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] efi: don't shadow i in efi_config_parse_tables()
@ 2020-02-23 22:13 Heinrich Schuchardt
  2020-02-26 17:07 ` Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2020-02-23 22:13 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: linux-efi, linux-kernel, Heinrich Schuchardt

Shadowing variables is generally frowned upon.

Let's simply reuse the existing loop counter i instead of shadowing it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/firmware/efi/efi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 69a585106d30..d0c7f4c1db31 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -553,7 +553,6 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
 		while (prsv) {
 			struct linux_efi_memreserve *rsv;
 			u8 *p;
-			int i;

 			/*
 			 * Just map a full page: that is what we will get
--
2.25.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] efi: don't shadow i in efi_config_parse_tables()
  2020-02-23 22:13 [PATCH 1/1] efi: don't shadow i in efi_config_parse_tables() Heinrich Schuchardt
@ 2020-02-26 17:07 ` Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2020-02-26 17:07 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: linux-efi, Linux Kernel Mailing List

On Sun, 23 Feb 2020 at 23:13, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Shadowing variables is generally frowned upon.
>
> Let's simply reuse the existing loop counter i instead of shadowing it.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Queued in efi/next, thanks.

> ---
>  drivers/firmware/efi/efi.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> index 69a585106d30..d0c7f4c1db31 100644
> --- a/drivers/firmware/efi/efi.c
> +++ b/drivers/firmware/efi/efi.c
> @@ -553,7 +553,6 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
>                 while (prsv) {
>                         struct linux_efi_memreserve *rsv;
>                         u8 *p;
> -                       int i;
>
>                         /*
>                          * Just map a full page: that is what we will get
> --
> 2.25.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-26 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-23 22:13 [PATCH 1/1] efi: don't shadow i in efi_config_parse_tables() Heinrich Schuchardt
2020-02-26 17:07 ` Ard Biesheuvel

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).