[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211115075834.156838-1-wangkefeng.wang@huawei.com>
Date: Mon, 15 Nov 2021 15:58:34 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Russell King <linux@...linux.org.uk>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
CC: Kefeng Wang <wangkefeng.wang@...wei.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] ARM: mm: mark private VM_FAULT_X defines as vm_fault_t
This fixes several sparse warnings for fault.c:
arch/arm/mm/fault.c:210:24: sparse: expected restricted vm_fault_t
arch/arm/mm/fault.c:210:24: sparse: got int
...
arch/arm/mm/fault.c:345:24: sparse: sparse: restricted vm_fault_t degrades to integer
Reported-by: kernel test robot <lkp@...el.com>
Fixes: caed89dab0ca ("ARM: 9128/1: mm: Refactor the __do_page_fault()")
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
arch/arm/mm/fault.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index bc8779d54a64..013921a5909b 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -191,8 +191,8 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
}
#ifdef CONFIG_MMU
-#define VM_FAULT_BADMAP 0x010000
-#define VM_FAULT_BADACCESS 0x020000
+#define VM_FAULT_BADMAP ((__force vm_fault_t)0x010000)
+#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x020000)
static inline bool is_permission_fault(unsigned int fsr)
{
--
2.26.2
Powered by blists - more mailing lists