diff mbox series

powerpc: Remove initialisation of readpos

Message ID 20231024145600.739451-1-willy@infradead.org (mailing list archive)
State Mainlined
Commit 0f7f544af60a6082cfaa3ed4c8f4ca1a858807ee
Headers show
Series powerpc: Remove initialisation of readpos | expand

Commit Message

Matthew Wilcox Oct. 24, 2023, 2:55 p.m. UTC
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(-)

Comments

Kees Cook Oct. 24, 2023, 9:50 p.m. UTC | #1
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>
diff mbox series

Patch

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)