s390/mm: mark private defines for vm_fault_t as such
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 27 Feb 2020 13:42:29 +0000 (14:42 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 4 Mar 2020 10:15:50 +0000 (11:15 +0100)
This fixes several sparse warnings for fault.c:

arch/s390/mm/fault.c:336:36: warning: restricted vm_fault_t degrades to integer
arch/s390/mm/fault.c:573:23: warning: incorrect type in assignment (different base types)
arch/s390/mm/fault.c:573:23:    expected restricted vm_fault_t [usertype] fault
arch/s390/mm/fault.c:573:23:    got int

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/mm/fault.c

index 7b0bb47..151adef 100644 (file)
 #define __SUBCODE_MASK 0x0600
 #define __PF_RES_FIELD 0x8000000000000000ULL
 
-#define VM_FAULT_BADCONTEXT    0x010000
-#define VM_FAULT_BADMAP                0x020000
-#define VM_FAULT_BADACCESS     0x040000
-#define VM_FAULT_SIGNAL                0x080000
-#define VM_FAULT_PFAULT                0x100000
+#define VM_FAULT_BADCONTEXT    ((__force vm_fault_t) 0x010000)
+#define VM_FAULT_BADMAP                ((__force vm_fault_t) 0x020000)
+#define VM_FAULT_BADACCESS     ((__force vm_fault_t) 0x040000)
+#define VM_FAULT_SIGNAL                ((__force vm_fault_t) 0x080000)
+#define VM_FAULT_PFAULT                ((__force vm_fault_t) 0x100000)
 
 enum fault_type {
        KERNEL_FAULT,