]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mips: asm: fix warning when disabling MIPS_FP_SUPPORT
authorJonas Gorski <jonas.gorski@gmail.com>
Sat, 12 Oct 2024 10:12:14 +0000 (12:12 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 30 Oct 2024 22:45:28 +0000 (23:45 +0100)
commitda09935975c8f8c90d6f57be2422dee5557206cd
treeb0556d25f42f5e4728eef3ce2605d628bf324300
parentb2d5ca95ecfa4a4aa6f5b54ffdfe8d149d390f1e
mips: asm: fix warning when disabling MIPS_FP_SUPPORT

When MIPS_FP_SUPPORT is disabled, __sanitize_fcr31() is defined as
nothing, which triggers a gcc warning:

    In file included from kernel/sched/core.c:79:
    kernel/sched/core.c: In function 'context_switch':
    ./arch/mips/include/asm/switch_to.h:114:39: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
      114 |                 __sanitize_fcr31(next);                                 \
          |                                       ^
    kernel/sched/core.c:5316:9: note: in expansion of macro 'switch_to'
     5316 |         switch_to(prev, next, prev);
          |         ^~~~~~~~~

Fix this by providing an empty body for __sanitize_fcr31() like one is
defined for __mips_mt_fpaff_switch_to().

Fixes: 36a498035bd2 ("MIPS: Avoid FCSR sanitization when CONFIG_MIPS_FP_SUPPORT=n")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/switch_to.h