Thread (2 messages) flat view 2 messages, 2 authors, 2016-09-13

Re: [v2] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common()

From: Michael Ellerman <hidden>
Date: 2016-09-13 12:16:36

On Sun, 2016-11-09 at 13:44:13 UTC, Simon Guo wrote:
From: Simon Guo <redacted>

The ckpt_regs usage in gpr32_set_common/gpr32_get_common() will lead to
following cppcheck error at ifndef CONFIG_PPC_TRANSACTIONAL_MEM case:

[arch/powerpc/kernel/ptrace.c:2062]:
(error) Uninitialized variable: ckpt_regs
[arch/powerpc/kernel/ptrace.c:2130]:
(error) Uninitialized variable: ckpt_regs

The problem is due to gpr32_set_common() used ckpt_regs variable which
only makes sense at #ifdef CONFIG_PPC_TRANSACTIONAL_MEM.

This patch fix this issue by passing in "regs" parameter instead.

Reported-by: Daniel Axtens <redacted>
Signed-off-by: Simon Guo <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/261831160d4df6bafe2f0e12e6

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help