[PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.
Michael Ellerman
mpe at ellerman.id.au
Fri Sep 9 20:52:52 AEST 2016
Daniel Axtens <dja at axtens.net> writes:
> [ Unknown signature status ]
> Simon Guo <wei.guo.simon at gmail.com> 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 sometime to think about it. I don't like to use
>> "__maybe_unused" to bypass this warning.
>
> Fair enough. I don't have strong feelings either way - we'll see if the
> maintainers have any thoughts.
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 has gone wrong :)
Does Cyril's series to rework the TM structures help at all with this
warning?
cheers
More information about the Linuxppc-dev
mailing list