[to-be-updated] mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-fix-2.patch removed from -mm tree

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

 



The patch titled
     Subject: mm/hmm.c: fix unused variable warnings
has been removed from the -mm tree.  Its filename was
     mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-fix-2.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Arnd Bergmann <arnd@xxxxxxxx>
Subject: mm/hmm.c: fix unused variable warnings

When CONFIG_HUGETLB_PAGE is disabled, the only use of the variable 'h' is
compiled out, and the compiler thinks it is unnecessary:

mm/hmm.c: In function 'hmm_range_snapshot':
mm/hmm.c:1015:19: error: unused variable 'h' [-Werror=unused-variable]
    struct hstate *h = hstate_vma(vma);

Rephrase the code to avoid the temporary variable instead, so the
compiler stops warning.

Link: http://lkml.kernel.org/r/20190304200026.1140281-1-arnd@xxxxxxxx
Fixes: 5409a90d4212 ("mm/hmm: support hugetlbfs (snapshotting, faulting and DMA mapping)")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Tested-by: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Jérôme Glisse <jglisse@xxxxxxxxxx>
Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- a/mm/hmm.c~mm-hmm-allow-to-mirror-vma-of-a-file-on-a-dax-backed-filesystem-fix-2
+++ a/mm/hmm.c
@@ -1011,9 +1011,8 @@ long hmm_range_snapshot(struct hmm_range
 			return -EFAULT;
 
 		if (is_vm_hugetlb_page(vma)) {
-			struct hstate *h = hstate_vma(vma);
-
-			if (huge_page_shift(h) != range->page_shift &&
+			if (range->page_shift !=
+				huge_page_shift(hstate_vma(vma)) &&
 			    range->page_shift != PAGE_SHIFT)
 				return -EINVAL;
 		} else {
@@ -1114,9 +1113,8 @@ long hmm_range_fault(struct hmm_range *r
 			return -EFAULT;
 
 		if (is_vm_hugetlb_page(vma)) {
-			struct hstate *h = hstate_vma(vma);
-
-			if (huge_page_shift(h) != range->page_shift &&
+			if (range->page_shift !=
+				huge_page_shift(hstate_vma(vma)) &&
 			    range->page_shift != PAGE_SHIFT)
 				return -EINVAL;
 		} else {
_

Patches currently in -mm which might be from arnd@xxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux