• Paul Burton's avatar
    MIPS: Prevent compiler warning from cop2_{save,restore} · b89f3068
    Paul Burton authored
    The no-op cases of cop2_save & cop2_restore lead to the following
    warnings being emitted during build with recent versions of gcc (tested
    using gcc 4.8.3 from the Mentor Sourcery CodeBench 2014.05 toolchain):
    
      In file included from ./arch/mips/include/asm/switch_to.h:18:0,
                       from kernel/sched/core.c:78:
      kernel/sched/core.c: In function 'finish_task_switch':
      include/asm-generic/current.h:6:45: warning: value computed is not used [-Wunused-value]
       #define get_current() (current_thread_info()->task)
                                                   ^
      ./arch/mips/include/asm/cop2.h:48:32: note: in definition of macro 'cop2_restore'
       #define cop2_restore(r)  do { (r); } while (0)
                                      ^
      include/asm-generic/current.h:7:17: note: in expansion of macro 'get_current'
       #define current get_current()
                       ^
      ./arch/mips/include/asm/switch_to.h:114:16: note: in expansion of macro 'current'
    ...
    b89f3068
cop2.h 1.77 KB