Patch "mips: asm: fix warning when disabling MIPS_FP_SUPPORT" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mips: asm: fix warning when disabling MIPS_FP_SUPPORT

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mips-asm-fix-warning-when-disabling-mips_fp_support.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a29afac8012ee2908ad60c5c2befe5f568363a98
Author: Jonas Gorski <jonas.gorski@xxxxxxxxx>
Date:   Sat Oct 12 12:12:14 2024 +0200

    mips: asm: fix warning when disabling MIPS_FP_SUPPORT
    
    [ Upstream commit da09935975c8f8c90d6f57be2422dee5557206cd ]
    
    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@xxxxxxxxx>
    Reviewed-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h
index a4374b4cb88fd..d6ccd53440213 100644
--- a/arch/mips/include/asm/switch_to.h
+++ b/arch/mips/include/asm/switch_to.h
@@ -97,7 +97,7 @@ do {									\
 	}								\
 } while (0)
 #else
-# define __sanitize_fcr31(next)
+# define __sanitize_fcr31(next) do { (void) (next); } while (0)
 #endif
 
 /*




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux