sparc: remove unused variable strtab
PATCH v2 1/1 sparc: remove unused variable strtab
From: Alex Shi <[email protected]>
The commit 1b35a57b1c178 ("sparc32: Kill off software 32-bit multiply/divide
routines") removed the last usage of strtab in funtion module_frob_arch_sections
Therefore, it can be removed now.
Reported-by kernel test robot <[email protected]>
Cc David S. Miller <[email protected]>
Cc Andreas Larsson <[email protected]>
Signed-off-by Alex Shi <[email protected]>
---v1->v2:
Change subject prefix: arch/sparc32 -> sparc
arch/sparc/kernel/module.c | 2 -- 1 file changed, 2 deletions(-)
arch/sparc/kernel/module.c +0 -2
@@ -29,7 +29,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, {unsigned int symidx;Elf_Sym *sym; -char *strtab;int i;for (symidx =0 ; sechdrs[symidx].sh_type !=SHT_SYMTAB ; symidx++) {
@@ -39,7 +38,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, } } sym = (Elf_Sym *)sechdrs[symidx].sh_addr; - strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr;for (i =1 ; i < sechdrs[symidx].sh_size /sizeof (Elf_Sym); i++) {if (sym[i].st_shndx ==SHN_UNDEF ) {
Signature · 1 line
2.43.0
Quoted 31 lines · On 2026-02-05 14:39, [email protected] wrote:
From: Alex Shi <[email protected]>
The commit
1b35a57b1c178("sparc32: Kill off software 32-bit multiply/divide
routines") removed the last usage of strtab in funtionmodule_frob_arch_sections
Therefore, it can be removed now.Reported-by kernel test robot <[email protected]>Cc David S. Miller <[email protected]>Cc Andreas Larsson <[email protected]>Signed-off-by Alex Shi <[email protected]>---
v1->v2:
Change subject prefix:arch/sparc32-> sparcarch/sparc/kernel/module.c | 2 -- 1 file changed, 2 deletions(-)arch/sparc/kernel/module.c +0
-1@@ -29,7 +29,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, {unsigned int symidx;Elf_Sym *sym; -char *strtab;int i;for (symidx =0 ; sechdrs[symidx].sh_type !=SHT_SYMTAB ; symidx++) {
arch/sparc/kernel/module.c int module_frob_arch_sections(Elf_Ehdr *hdr, · line 43
Quoted 7 lines
arch/sparc/kernel/module.c +0
-1@@ -39,7 +38,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, } } sym = (Elf_Sym *)sechdrs[symidx].sh_addr; - strtab = (char *)sechdrs[sechdrs[symidx].sh_link].sh_addr;for (i =1 ; i < sechdrs[symidx].sh_size /sizeof (Elf_Sym); i++) {if (sym[i].st_shndx ==SHN_UNDEF ) {
Reviewed-by Andreas Larsson <[email protected]>
Picking this up to my for-next.
Thanks,
Andreas