* [merged mm-stable] hugetlb_cgroup-hugetlbfs-use-helper-macro-sz_1kmg.patch removed from -mm tree
@ 2022-09-12 3:28 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-09-12 3:28 UTC (permalink / raw)
To: mm-commits, mike.kravetz, almasrymina, linmiaohe, akpm
The quilt patch titled
Subject: hugetlb_cgroup: hugetlbfs: use helper macro SZ_1{K,M,G}
has been removed from the -mm tree. Its filename was
hugetlb_cgroup-hugetlbfs-use-helper-macro-sz_1kmg.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: Miaohe Lin <linmiaohe@huawei.com>
Subject: hugetlb_cgroup: hugetlbfs: use helper macro SZ_1{K,M,G}
Date: Fri, 29 Jul 2022 16:01:03 +0800
Use helper macro SZ_1K, SZ_1M and SZ_1G to do the size conversion. Minor
readability improvement.
Link: https://lkml.kernel.org/r/20220729080106.12752-3-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb_cgroup.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/mm/hugetlb_cgroup.c~hugetlb_cgroup-hugetlbfs-use-helper-macro-sz_1kmg
+++ a/mm/hugetlb_cgroup.c
@@ -675,12 +675,12 @@ static ssize_t hugetlb_cgroup_reset(stru
static char *mem_fmt(char *buf, int size, unsigned long hsize)
{
- if (hsize >= (1UL << 30))
- snprintf(buf, size, "%luGB", hsize >> 30);
- else if (hsize >= (1UL << 20))
- snprintf(buf, size, "%luMB", hsize >> 20);
+ if (hsize >= SZ_1G)
+ snprintf(buf, size, "%luGB", hsize / SZ_1G);
+ else if (hsize >= SZ_1M)
+ snprintf(buf, size, "%luMB", hsize / SZ_1M);
else
- snprintf(buf, size, "%luKB", hsize >> 10);
+ snprintf(buf, size, "%luKB", hsize / SZ_1K);
return buf;
}
_
Patches currently in -mm which might be from linmiaohe@huawei.com are
mm-hwpoison-use-clearpagehwpoison-in-memory_failure.patch
mm-hwpoison-use-__pagemovable-to-detect-non-lru-movable-pages.patch
mm-hwpoison-use-num_poisoned_pages_sub-to-decrease-num_poisoned_pages.patch
mm-hwpoison-avoid-unneeded-page_mapped_in_vma-overhead-in-collect_procs_anon.patch
mm-hwpoison-check-pagetable-explicitly-in-hwpoison_user_mappings.patch
mm-hwpoison-cleanup-some-obsolete-comments.patch
writeback-remove-unused-macro-dirty_full_scope.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-12 3:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12 3:28 [merged mm-stable] hugetlb_cgroup-hugetlbfs-use-helper-macro-sz_1kmg.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.