Skip to content

Commit

Permalink
MIPS: Fix potential build failures using cpu_vpe_id on non-MT
Browse files Browse the repository at this point in the history
When used in a non-MT kernel, the cpu_vpe_id macro never made use of
its cpuinfo argument. It doesn't actually need to since it is returning
a constant 0. However not using the argument can lead to build failures
if the compiler then notices that a variable used as part of the
argument is unused. Prevent that problem by "using" the argument as far
as the compiler is concerned, whilst still returning 0 as before.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7280/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Paul Burton authored and Ralf Baechle committed Jul 30, 2014
1 parent a8b8467 commit 34bd3e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/cpu-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct proc_cpuinfo_notifier_args {
#ifdef CONFIG_MIPS_MT_SMP
# define cpu_vpe_id(cpuinfo) ((cpuinfo)->vpe_id)
#else
# define cpu_vpe_id(cpuinfo) 0
# define cpu_vpe_id(cpuinfo) ({ (void)cpuinfo; 0; })
#endif

#endif /* __ASM_CPU_INFO_H */

0 comments on commit 34bd3e6

Please sign in to comment.