summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2018-11-07 19:49:00 +0300
committerRussell King <rmk+kernel@armlinux.org.uk>2018-11-08 13:57:09 +0300
commitb99afae1390140f5b0039e6b37a7380de31ae874 (patch)
treeeec57bfb462e01483c0dc6a7848e24b8ac6334c7 /.clang-format
parent31d0b9f9982f8e3a489e83419461d35ab003160a (diff)
downloadlinux-b99afae1390140f5b0039e6b37a7380de31ae874.tar.xz
ARM: 8805/2: remove unneeded naked function usage
The naked attribute is known to confuse some old gcc versions when function arguments aren't explicitly listed as inline assembly operands despite the gcc documentation. That resulted in commit 9a40ac86152c ("ARM: 6164/1: Add kto and kfrom to input operands list."). Yet that commit has problems of its own by having assembly operand constraints completely wrong. If the generated code has been OK since then, it is due to luck rather than correctness. So this patch also provides proper assembly operand constraints, and removes two instances of redundant register usages in the implementation while at it. Inspection of the generated code with this patch doesn't show any obvious quality degradation either, so not relying on __naked at all will make the code less fragile, and avoid some issues with clang. The only remaining __naked instances (excluding the kprobes test cases) are exynos_pm_power_up_setup(), tc2_pm_power_up_setup() and cci_enable_port_for_self(. But in the first two cases, only the function address is used by the compiler with no chance of inlining it by mistake, and the third case is called from assembly code only. And the fact that no stack is available when the corresponding code is executed does warrant the __naked usage in those cases. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Stefan Agner <stefan@agner.ch> Tested-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions