]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/swapfile.c: optimize code in setup_clusters()
authorBaoquan He <bhe@redhat.com>
Wed, 5 Feb 2025 09:27:16 +0000 (17:27 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 4 Mar 2025 05:49:40 +0000 (21:49 -0800)
commitd86c5e7478ce6be11ca0f5ec2fb38f86c2f79ec3
treec2f14b6b9ca19eac996896407ec0d82bde34ebc4
parentb37fa37cbff0ce96e8ddbbee3f8b946400385090
mm/swapfile.c: optimize code in setup_clusters()

In the last 'for' loop inside setup_clusters(), using two local variable
'k' and 'j' are obvisouly redundant.  Using 'j' is enough and simpler.

And also move macro SWAP_CLUSTER_COLS close to its only user
setup_clusters().

Link: https://lkml.kernel.org/r/20250205092721.9395-8-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <ryncsn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c