Re: [PATCH] arch/sparc: remove unused varible paddrbase in function leon_swprobe()

From: Andreas Larsson
Date: Fri Sep 13 2024 - 14:09:31 EST


On 2024-07-29 08:49, alexs@xxxxxxxxxx wrote:
> From: Alex Shi <alexs@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> To: linux-kernel@xxxxxxxxxxxxxxx
> To: sparclinux@xxxxxxxxxxxxxxx
> To: Christian Brauner <brauner@xxxxxxxxxx>
> To: Andreas Larsson <andreas@xxxxxxxxxxx>
> To: David S. Miller <davem@xxxxxxxxxxxxx>
> ---
> arch/sparc/mm/leon_mm.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)

Reviewed-by: Andreas Larsson <andreas@xxxxxxxxxxx>
Tested-by: Andreas Larsson <andreas@xxxxxxxxxxx>

Picking this up to my for-next.

Thanks,
Andreas