[PATCH] powerpc: Remove initialisation of readpos

Matthew Wilcox (Oracle) posted 1 patch 2 years, 2 months ago
arch/powerpc/kernel/setup-common.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] powerpc: Remove initialisation of readpos
Posted by Matthew Wilcox (Oracle) 2 years, 2 months ago
While powerpc doesn't use the seq_buf readpos, it did explicitly
initialise it for no good reason.

Fixes: d0ed46b60396 ("tracing: Move readpos from seq_buf to trace_seq")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 arch/powerpc/kernel/setup-common.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2f1026fba00d..34975532e44c 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -601,7 +601,6 @@ struct seq_buf ppc_hw_desc __initdata = {
 	.buffer = ppc_hw_desc_buf,
 	.size = sizeof(ppc_hw_desc_buf),
 	.len = 0,
-	.readpos = 0,
 };
 
 static __init void probe_machine(void)
-- 
2.40.1
Re: [PATCH] powerpc: Remove initialisation of readpos
Posted by Kees Cook 2 years, 2 months ago
On Tue, Oct 24, 2023 at 03:55:59PM +0100, Matthew Wilcox (Oracle) wrote:
> While powerpc doesn't use the seq_buf readpos, it did explicitly
> initialise it for no good reason.
> 
> Fixes: d0ed46b60396 ("tracing: Move readpos from seq_buf to trace_seq")
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Yeah, looks right -- it'd even be right if the member still existed. :)

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook