* [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe()
@ 2024-07-29 6:49 alexs
2024-08-16 9:32 ` Alex Shi
2024-09-13 18:00 ` Andreas Larsson
0 siblings, 2 replies; 3+ messages in thread
From: alexs @ 2024-07-29 6:49 UTC (permalink / raw)
To: David S . Miller, Andreas Larsson, Christian Brauner, sparclinux,
linux-kernel
Cc: Alex Shi
From: Alex Shi <alexs@kernel.org>
commit f22ed71cd602 ("sparc32,leon: SRMMU MMU Table probe fix") change
return value from paddrbase to 'pte', but left the varible here.
That causes a build warning for this varible, so we may remove it.
make --keep-going CROSS_COMPILE=/home/alexs/0day/gcc-14.1.0-nolibc/sparc-linux/bin/sparc-linux- --jobs=16 KCFLAGS= -Wtautological-compare -Wno-error=return-type -Wreturn-type -Wcast-function-type -funsigned-char -Wundef -fstrict-flex-arrays=3 -Wformat-overflow -Wformat-truncation -Wrestrict -Wenum-conversion W=1 O=sparc ARCH=sparc defconfig SHELL=/bin/bash arch/sparc/mm/ mm/ -s
<stdin>:1519:2: warning: #warning syscall clone3 not implemented [-Wcpp]
../arch/sparc/mm/leon_mm.c: In function 'leon_swprobe':
../arch/sparc/mm/leon_mm.c:42:32: warning: variable 'paddrbase' set but not used [-Wunused-but-set-variable]
42 | unsigned int lvl, pte, paddrbase;
| ^~~~~~~~~
Signed-off-by: Alex Shi <alexs@kernel.org>
To: linux-kernel@vger.kernel.org
To: sparclinux@vger.kernel.org
To: Christian Brauner <brauner@kernel.org>
To: Andreas Larsson <andreas@gaisler.com>
To: David S. Miller <davem@davemloft.net>
---
arch/sparc/mm/leon_mm.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/sparc/mm/leon_mm.c b/arch/sparc/mm/leon_mm.c
index ec61ff1f96b7..1dc9b3d70eda 100644
--- a/arch/sparc/mm/leon_mm.c
+++ b/arch/sparc/mm/leon_mm.c
@@ -39,12 +39,10 @@ unsigned long leon_swprobe(unsigned long vaddr, unsigned long *paddr)
unsigned int ctxtbl;
unsigned int pgd, pmd, ped;
unsigned int ptr;
- unsigned int lvl, pte, paddrbase;
+ unsigned int lvl, pte;
unsigned int ctx;
unsigned int paddr_calc;
- paddrbase = 0;
-
if (srmmu_swprobe_trace)
printk(KERN_INFO "swprobe: trace on\n");
@@ -73,7 +71,6 @@ unsigned long leon_swprobe(unsigned long vaddr, unsigned long *paddr)
printk(KERN_INFO "swprobe: pgd is entry level 3\n");
lvl = 3;
pte = pgd;
- paddrbase = pgd & _SRMMU_PTE_PMASK_LEON;
goto ready;
}
if (((pgd & SRMMU_ET_MASK) != SRMMU_ET_PTD)) {
@@ -96,7 +93,6 @@ unsigned long leon_swprobe(unsigned long vaddr, unsigned long *paddr)
printk(KERN_INFO "swprobe: pmd is entry level 2\n");
lvl = 2;
pte = pmd;
- paddrbase = pmd & _SRMMU_PTE_PMASK_LEON;
goto ready;
}
if (((pmd & SRMMU_ET_MASK) != SRMMU_ET_PTD)) {
@@ -124,7 +120,6 @@ unsigned long leon_swprobe(unsigned long vaddr, unsigned long *paddr)
printk(KERN_INFO "swprobe: ped is entry level 1\n");
lvl = 1;
pte = ped;
- paddrbase = ped & _SRMMU_PTE_PMASK_LEON;
goto ready;
}
if (((ped & SRMMU_ET_MASK) != SRMMU_ET_PTD)) {
@@ -147,7 +142,6 @@ unsigned long leon_swprobe(unsigned long vaddr, unsigned long *paddr)
printk(KERN_INFO "swprobe: ptr is entry level 0\n");
lvl = 0;
pte = ptr;
- paddrbase = ptr & _SRMMU_PTE_PMASK_LEON;
goto ready;
}
if (srmmu_swprobe_trace)
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe()
2024-07-29 6:49 [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe() alexs
@ 2024-08-16 9:32 ` Alex Shi
2024-09-13 18:00 ` Andreas Larsson
1 sibling, 0 replies; 3+ messages in thread
From: Alex Shi @ 2024-08-16 9:32 UTC (permalink / raw)
To: alexs; +Cc: andreas, brauner, davem, linux-kernel, sparclinux
Ping.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe()
2024-07-29 6:49 [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe() alexs
2024-08-16 9:32 ` Alex Shi
@ 2024-09-13 18:00 ` Andreas Larsson
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Larsson @ 2024-09-13 18:00 UTC (permalink / raw)
To: alexs, David S . Miller, Christian Brauner, sparclinux, linux-kernel
On 2024-07-29 08:49, alexs@kernel.org wrote:
> From: Alex Shi <alexs@kernel.org>
>
> commit f22ed71cd602 ("sparc32,leon: SRMMU MMU Table probe fix") change
> return value from paddrbase to 'pte', but left the varible here.
> That causes a build warning for this varible, so we may remove it.
>
> make --keep-going CROSS_COMPILE=/home/alexs/0day/gcc-14.1.0-nolibc/sparc-linux/bin/sparc-linux- --jobs=16 KCFLAGS= -Wtautological-compare -Wno-error=return-type -Wreturn-type -Wcast-function-type -funsigned-char -Wundef -fstrict-flex-arrays=3 -Wformat-overflow -Wformat-truncation -Wrestrict -Wenum-conversion W=1 O=sparc ARCH=sparc defconfig SHELL=/bin/bash arch/sparc/mm/ mm/ -s
> <stdin>:1519:2: warning: #warning syscall clone3 not implemented [-Wcpp]
> ../arch/sparc/mm/leon_mm.c: In function 'leon_swprobe':
> ../arch/sparc/mm/leon_mm.c:42:32: warning: variable 'paddrbase' set but not used [-Wunused-but-set-variable]
> 42 | unsigned int lvl, pte, paddrbase;
> | ^~~~~~~~~
>
> Signed-off-by: Alex Shi <alexs@kernel.org>
> To: linux-kernel@vger.kernel.org
> To: sparclinux@vger.kernel.org
> To: Christian Brauner <brauner@kernel.org>
> To: Andreas Larsson <andreas@gaisler.com>
> To: David S. Miller <davem@davemloft.net>
> ---
> arch/sparc/mm/leon_mm.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Picking this up to my for-next.
Thanks,
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-13 18:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-29 6:49 [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe() alexs
2024-08-16 9:32 ` Alex Shi
2024-09-13 18:00 ` Andreas Larsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®