+ mm-damon-paddr-improve-readability-of-damon_pa_stat.patch added to mm-unstable branch

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

 



The patch titled
     Subject: mm/damon/paddr: improve readability of damon_pa_stat
has been added to the -mm mm-unstable branch.  Its filename is
     mm-damon-paddr-improve-readability-of-damon_pa_stat.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-paddr-improve-readability-of-damon_pa_stat.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>
Subject: mm/damon/paddr: improve readability of damon_pa_stat
Date: Mon, 13 Jan 2025 13:01:56 -0800

damon_pa_stat contains an unnecessary goto statement, and the if/else can
be re-written to be more readable.

This patch is written on top of SJ's patch series [1], which in turn is
written on top of another one of his series [2].

[1] https://lore.kernel.org/all/20241219040327.61902-1-sj@xxxxxxxxxx/
[2] https://lore.kernel.org/all/20241213215306.54778-1-sj@xxxxxxxxxx/

Link: https://lkml.kernel.org/r/20250113210201.446051-1-joshua.hahnjy@xxxxxxxxx
Signed-off-by: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>
Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/damon/paddr.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/mm/damon/paddr.c~mm-damon-paddr-improve-readability-of-damon_pa_stat
+++ a/mm/damon/paddr.c
@@ -510,11 +510,8 @@ static unsigned long damon_pa_stat(struc
 		if (!folio)
 			continue;
 
-		if (damos_pa_filter_out(s, folio))
-			goto put_folio;
-		else
+		if (!damos_pa_filter_out(s, folio))
 			*sz_filter_passed += folio_size(folio);
-put_folio:
 		folio_put(folio);
 	}
 	return 0;
_

Patches currently in -mm which might be from joshua.hahnjy@xxxxxxxxx are

memcg-hugetlb-introduce-memcg_accounts_hugetlb.patch
memcg-hugetlb-introduce-mem_cgroup_charge_hugetlb.patch
memcg-hugetlb-remove-memcg-hugetlb-try-commit-cancel-protocol.patch
mm-damon-paddr-improve-readability-of-damon_pa_stat.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