Skip to content

Commit bc581db

Browse files
chleroympe
authored andcommitted
powerpc/signal: Fix possible build failure with unsafe_copy_fpr_{to/from}_user
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/cadc0a328bc8e6c5bf133193e7547d5c10ae7895.1620465920.git.christophe.leroy@csgroup.eu
1 parent 7315e45 commit bc581db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/kernel/signal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ copy_ckfpr_from_user(struct task_struct *task, void __user *from)
166166
}
167167
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
168168
#else
169-
#define unsafe_copy_fpr_to_user(to, task, label) do { } while (0)
169+
#define unsafe_copy_fpr_to_user(to, task, label) do { if (0) goto label;} while (0)
170170

171-
#define unsafe_copy_fpr_from_user(task, from, label) do { } while (0)
171+
#define unsafe_copy_fpr_from_user(task, from, label) do { if (0) goto label;} while (0)
172172

173173
static inline unsigned long
174174
copy_fpr_to_user(void __user *to, struct task_struct *task)

0 commit comments

Comments
 (0)