Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-09-11 Thread Michael Ellerman
Simon Guo writes: > Thanks for the feedback regarding too many ifdefs. Is following implemention > better for this issue? Yes that looks much better. Can you send a proper patch with a change log and so on, thanks. cheers

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-09-11 Thread Simon Guo
On Fri, Sep 09, 2016 at 08:52:52PM +1000, Michael Ellerman wrote: > I do - Sorry Simon but your patch just adds too many #ifdefs. > > Any time you have to do something like: > > +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM > } > +#endif > > It should be a sign that something

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-09-09 Thread Michael Ellerman
Daniel Axtens writes: > [ Unknown signature status ] > Simon Guo writes: > >> I think keeping tm_active argument for "ifndef CONFIG_PPC_TRANSACTIONAL_MEM" >> case (with __maybe_unused prefix) will be somehow strange -- Whatever >> value is provided in

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-08-24 Thread Daniel Axtens
Simon Guo writes: > I think keeping tm_active argument for "ifndef CONFIG_PPC_TRANSACTIONAL_MEM" > case (with __maybe_unused prefix) will be somehow strange -- Whatever > value is provided in the caller function for tm_active, programmer might be > puzzled and cost

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-08-24 Thread Simon Guo
Hi Daniel, On Wed, Aug 24, 2016 at 12:21:23PM +1000, Daniel Axtens wrote: > Hi Simon, > > > The ckpt_regs usage in gpr32_set_common/gpr32_get_common() > > will lead to cppcheck error. > > > > [arch/powerpc/kernel/ptrace.c:2062]: (error) Uninitialized variable: > > ckpt_regs > >

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-08-23 Thread Daniel Axtens
Hi Simon, > The ckpt_regs usage in gpr32_set_common/gpr32_get_common() > will lead to cppcheck error. > > [arch/powerpc/kernel/ptrace.c:2062]: (error) Uninitialized variable: ckpt_regs > [arch/powerpc/kernel/ptrace.c:2130]: (error) Uninitialized variable: ckpt_regs > > A straightforward fix to

[PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-08-22 Thread wei . guo . simon
From: Simon Guo The ckpt_regs usage in gpr32_set_common/gpr32_get_common() will lead to cppcheck error. [arch/powerpc/kernel/ptrace.c:2062]: (error) Uninitialized variable: ckpt_regs [arch/powerpc/kernel/ptrace.c:2130]: (error) Uninitialized variable: ckpt_regs A