projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7315e45
)
powerpc/signal: Fix possible build failure with unsafe_copy_fpr_{to/from}_user
author
Christophe Leroy
<christophe.leroy@csgroup.eu>
Sat, 8 May 2021 09:25:44 +0000
(09:25 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 12 May 2021 01:07:39 +0000
(11:07 +1000)
When neither CONFIG_VSX nor CONFIG_PPC_FPU_REGS are selected,
unsafe_copy_fpr_to_user() and unsafe_copy_fpr_from_user() are
doing nothing.
Then, unless the 'label' operand is used elsewhere, GCC complains
about it being defined but not used.
To fix that, add an impossible 'goto label'.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/cadc0a328bc8e6c5bf133193e7547d5c10ae7895.1620465920.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/signal.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/signal.h
b/arch/powerpc/kernel/signal.h
index f4aafa337c2edbcc26dbd82df8059f0555cd2257..1f07317964e499c73ced538b8477e2f45183d3b1 100644
(file)
--- a/
arch/powerpc/kernel/signal.h
+++ b/
arch/powerpc/kernel/signal.h
@@
-166,9
+166,9
@@
copy_ckfpr_from_user(struct task_struct *task, void __user *from)
}
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
#else
-#define unsafe_copy_fpr_to_user(to, task, label) do { } while (0)
+#define unsafe_copy_fpr_to_user(to, task, label) do {
if (0) goto label;
} while (0)
-#define unsafe_copy_fpr_from_user(task, from, label) do { } while (0)
+#define unsafe_copy_fpr_from_user(task, from, label) do {
if (0) goto label;
} while (0)
static inline unsigned long
copy_fpr_to_user(void __user *to, struct task_struct *task)