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