Skip to contentSkip to conversation

microblaze/mm/highmem: Remove redundant initialization of variable maxmem

PATCH In review Colin Ian King 2 participants 2 messages Nov 26, 2021 – Nov 29, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 microblaze/mm/highmem: Remove redundant initialization of variable maxmem

The variable maxmem is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

---
 arch/microblaze/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/mm/init.c +1 -1
index 952f35b335b2..f328d4549fad 100644
@@ -144,7 +144,7 @@ int page_is_ram(unsigned long pfn)
  */
 static void mm_cmdline_setup(void)
 {
-	unsigned long maxmem = 0;
+	unsigned long maxmem;
 	char *p = cmd_line;
 
 	/* Look for mem= option on command line */
Signature · 1 line
2.33.1
maintainer
#1 lore raw

Hi Colin,

pá 26. 11. 2021 v 23:53 odesílatel Colin Ian King
<[email protected]> napsal:

Quoted 24 lines

The variable maxmem is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

---
 arch/microblaze/mm/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/mm/init.c +1 -2
index 952f35b335b2..f328d4549fad 100644
@@ -144,7 +144,7 @@ int page_is_ram(unsigned long pfn)
  */
 static void mm_cmdline_setup(void)
 {
-       unsigned long maxmem = 0;
+       unsigned long maxmem;
        char *p = cmd_line;
 
        /* Look for mem= option on command line */
--
Quoted 2 lines

2.33.1

The patch is fine but From and SoB email are different. Please fix it. ./scripts/checkpatch.pl --codespell --strict 0001-microblaze-mm-highmem-Remove-redundant-initializatio.patch
WARNING: From:/Signed-off-by: email address mismatch: 'From: Colin Ian King <[email protected]>' != 'Signed-off-by: Colin Ian King <[email protected]>'

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs