* [merged mm-stable] mm-vmalloc-replace-the-ternary-conditional-operator-with-min.patch removed from -mm tree
@ 2023-06-19 23:21 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-06-19 23:21 UTC (permalink / raw)
To: mm-commits, urezki, lstoakes, hch, david, luhongfei, akpm
The quilt patch titled
Subject: mm/vmalloc: replace the ternary conditional operator with min()
has been removed from the -mm tree. Its filename was
mm-vmalloc-replace-the-ternary-conditional-operator-with-min.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: Lu Hongfei <luhongfei@vivo.com>
Subject: mm/vmalloc: replace the ternary conditional operator with min()
Date: Fri, 9 Jun 2023 17:30:57 +0800
It would be better to replace the traditional ternary conditional
operator with min() in zero_iter
Link: https://lkml.kernel.org/r/20230609093057.27777-1-luhongfei@vivo.com
Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/vmalloc.c~mm-vmalloc-replace-the-ternary-conditional-operator-with-min
+++ a/mm/vmalloc.c
@@ -3562,7 +3562,7 @@ static size_t zero_iter(struct iov_iter
while (remains > 0) {
size_t num, copied;
- num = remains < PAGE_SIZE ? remains : PAGE_SIZE;
+ num = min_t(size_t, remains, PAGE_SIZE);
copied = copy_page_to_iter_nofault(ZERO_PAGE(0), 0, num, iter);
remains -= copied;
_
Patches currently in -mm which might be from luhongfei@vivo.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-19 23:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 23:21 [merged mm-stable] mm-vmalloc-replace-the-ternary-conditional-operator-with-min.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.