[merged mm-stable] lib-test_hmm-use-min-to-improve-dmirror_exclusive.patch removed from -mm tree

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

 



The quilt patch titled
     Subject: lib: test_hmm: use min() to improve dmirror_exclusive()
has been removed from the -mm tree.  Its filename was
     lib-test_hmm-use-min-to-improve-dmirror_exclusive.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Subject: lib: test_hmm: use min() to improve dmirror_exclusive()
Date: Fri, 26 Jul 2024 15:12:46 +0200

Use min() to simplify the dmirror_exclusive() function and improve its
readability.

Link: https://lkml.kernel.org/r/20240726131245.161695-1-thorsten.blum@xxxxxxxxxx
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
Cc: Jérôme Glisse <jglisse@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/test_hmm.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/lib/test_hmm.c~lib-test_hmm-use-min-to-improve-dmirror_exclusive
+++ a/lib/test_hmm.c
@@ -799,10 +799,7 @@ static int dmirror_exclusive(struct dmir
 		unsigned long mapped = 0;
 		int i;
 
-		if (end < addr + (ARRAY_SIZE(pages) << PAGE_SHIFT))
-			next = end;
-		else
-			next = addr + (ARRAY_SIZE(pages) << PAGE_SHIFT);
+		next = min(end, addr + (ARRAY_SIZE(pages) << PAGE_SHIFT));
 
 		ret = make_device_exclusive_range(mm, addr, next, pages, NULL);
 		/*
_

Patches currently in -mm which might be from thorsten.blum@xxxxxxxxxx are

mm-shrinker-use-min-to-improve-shrinker_debugfs_scan_write.patch
lib-checksum-use-array_size-to-improve-assert_setup_correct.patch
ocfs2-use-max-to-improve-ocfs2_dlm_seq_show.patch





[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