]> Git Repo - linux.git/commitdiff
x86/mm/tlb: Define LOADED_MM_SWITCHING with pointer-sized number
authorJann Horn <[email protected]>
Thu, 28 Mar 2019 23:09:39 +0000 (00:09 +0100)
committerBorislav Petkov <[email protected]>
Fri, 29 Mar 2019 13:55:31 +0000 (14:55 +0100)
sparse complains that LOADED_MM_SWITCHING's definition casts an int to a
pointer:

  arch/x86/mm/tlb.c:409:17: warning: non size-preserving integer to pointer cast

Use a pointer-sized integer constant instead.

Signed-off-by: Jann Horn <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Mukesh Ojha <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Sai Praneeth <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: x86-ml <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/include/asm/tlbflush.h

index f4204bf377fcf72d597f1d0e438a3f85a8c54127..90926e8dd1f8cef95ec389ae5dfc1aef9f429633 100644 (file)
@@ -167,7 +167,7 @@ struct tlb_state {
         */
        struct mm_struct *loaded_mm;
 
-#define LOADED_MM_SWITCHING ((struct mm_struct *)1)
+#define LOADED_MM_SWITCHING ((struct mm_struct *)1UL)
 
        /* Last user mm for optimizing IBPB */
        union {
This page took 0.065078 seconds and 4 git commands to generate.