diff mbox series

[1/5] mm: gup: remove set but unused local variable major

Message ID 20210807093620.21347-2-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series Cleanups and fixup for gup | expand

Commit Message

Miaohe Lin Aug. 7, 2021, 9:36 a.m. UTC
Since commit a2beb5f1efed ("mm: clean up the last pieces of page fault
accountings"), the local variable major is unused. Remove it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/gup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

David Hildenbrand Aug. 9, 2021, 9:21 a.m. UTC | #1
On 07.08.21 11:36, Miaohe Lin wrote:
> Since commit a2beb5f1efed ("mm: clean up the last pieces of page fault
> accountings"), the local variable major is unused. Remove it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>   mm/gup.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index 77150624f77a..430495cb1b91 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -1276,7 +1276,7 @@ int fixup_user_fault(struct mm_struct *mm,
>   		     bool *unlocked)
>   {
>   	struct vm_area_struct *vma;
> -	vm_fault_t ret, major = 0;
> +	vm_fault_t ret;
>   
>   	address = untagged_addr(address);
>   
> @@ -1296,7 +1296,6 @@ int fixup_user_fault(struct mm_struct *mm,
>   		return -EINTR;
>   
>   	ret = handle_mm_fault(vma, address, fault_flags, NULL);
> -	major |= ret & VM_FAULT_MAJOR;
>   	if (ret & VM_FAULT_ERROR) {
>   		int err = vm_fault_to_errno(ret, 0);
>   
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
diff mbox series

Patch

diff --git a/mm/gup.c b/mm/gup.c
index 77150624f77a..430495cb1b91 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1276,7 +1276,7 @@  int fixup_user_fault(struct mm_struct *mm,
 		     bool *unlocked)
 {
 	struct vm_area_struct *vma;
-	vm_fault_t ret, major = 0;
+	vm_fault_t ret;
 
 	address = untagged_addr(address);
 
@@ -1296,7 +1296,6 @@  int fixup_user_fault(struct mm_struct *mm,
 		return -EINTR;
 
 	ret = handle_mm_fault(vma, address, fault_flags, NULL);
-	major |= ret & VM_FAULT_MAJOR;
 	if (ret & VM_FAULT_ERROR) {
 		int err = vm_fault_to_errno(ret, 0);