* [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set
@ 2023-05-19 13:13 Alexandre Ghiti
2023-05-19 13:54 ` Conor Dooley
2023-05-31 15:10 ` patchwork-bot+linux-riscv
0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Ghiti @ 2023-05-19 13:13 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Conor Dooley,
Alexandre Ghiti, linux-riscv, linux-kernel
commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap
region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa
variable definition in create_fdt_early_page_table(), so move it back to
its right place to quiet the following warning:
../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’:
../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable]
925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
arch/riscv/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 747e5b1ef02d..c6bb966e4123 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -922,9 +922,9 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va,
uintptr_t dtb_pa)
{
+#ifndef CONFIG_BUILTIN_DTB
uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
-#ifndef CONFIG_BUILTIN_DTB
/* Make sure the fdt fixmap address is always aligned on PMD size */
BUILD_BUG_ON(FIX_FDT % (PMD_SIZE / PAGE_SIZE));
--
2.37.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set
2023-05-19 13:13 [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set Alexandre Ghiti
@ 2023-05-19 13:54 ` Conor Dooley
2023-05-31 15:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2023-05-19 13:54 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv,
linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 778 bytes --]
On Fri, May 19, 2023 at 03:13:11PM +0200, Alexandre Ghiti wrote:
> commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap
> region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa
> variable definition in create_fdt_early_page_table(), so move it back to
> its right place to quiet the following warning:
>
> ../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’:
> ../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable]
> 925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
>
> Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region")
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks Alex.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set
2023-05-19 13:13 [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set Alexandre Ghiti
2023-05-19 13:54 ` Conor Dooley
@ 2023-05-31 15:10 ` patchwork-bot+linux-riscv
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-05-31 15:10 UTC (permalink / raw)
To: Alexandre Ghiti
Cc: linux-riscv, paul.walmsley, palmer, aou, conor.dooley,
linux-kernel
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Fri, 19 May 2023 15:13:11 +0200 you wrote:
> commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap
> region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa
> variable definition in create_fdt_early_page_table(), so move it back to
> its right place to quiet the following warning:
>
> ../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’:
> ../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable]
> 925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
>
> [...]
Here is the summary with links:
- [-fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set
https://git.kernel.org/riscv/c/33d418da6f47
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-31 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 13:13 [PATCH -fixes] riscv: Fix unused variable warning when BUILTIN_DTB is set Alexandre Ghiti
2023-05-19 13:54 ` Conor Dooley
2023-05-31 15:10 ` patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox