Re: [PATCH 2/3] mm/vamscan: fix various coding style warnings and errors

From: Zi Yan

Date: Sat Sep 05 2026 - 12:22:29 EST


On Sat Sep 5, 2026 at 10:01 AM EDT, Christos Skarlos wrote:
> Resolve coding style issues flagged by checkpatch.pl script. Specifically:
> - Add missing blank lines after variable declarations.
> - Replace "unsigned" with "unsigned int".
> - Replace spaces with tabs where possible.
>
> No functional changes are introduced.
>
> Signed-off-by: Christos Skarlos <christosskarlos.kernel@xxxxxxxxx>
> ---
> mm/vmscan.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)

Your subject has a typo: s/vamscan/vmscan

>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index f11491ee9ed5..8637cc0910fa 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -535,7 +535,7 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason)
> * writeback to a slow device to excessive referenced folios at the tail
> * of the inactive LRU.
> */
> - switch(reason) {
> + switch (reason) {
> case VMSCAN_THROTTLE_WRITEBACK:
> timeout = HZ/10;
>
> @@ -1529,6 +1529,7 @@ static unsigned int shrink_folio_list(struct list_head *folio_list,
> VM_BUG_ON_FOLIO(folio_test_active(folio), folio);
> if (!folio_test_mlocked(folio)) {
> int type = folio_is_file_lru(folio);
> +
> folio_set_active(folio);
> stat->nr_activate[type] += nr_pages;
> count_memcg_folio_events(folio, PGACTIVATE, nr_pages);
> @@ -2073,8 +2074,8 @@ static void shrink_active_list(unsigned long nr_to_scan,
> LIST_HEAD(l_hold); /* The folios which were snipped off */
> LIST_HEAD(l_active);
> LIST_HEAD(l_inactive);
> - unsigned nr_deactivate, nr_activate;
> - unsigned nr_rotated = 0;
> + unsigned int nr_deactivate, nr_activate;
> + unsigned int nr_rotated = 0;
> bool file = is_file_lru(lru);
> struct pglist_data *pgdat = lruvec_pgdat(lruvec);
>
> @@ -2614,7 +2615,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
> /*
> * If there is enough inactive page cache, we do not reclaim
> * anything from the anonymous working right now to make sure
> - * a streaming file access pattern doesn't cause swapping.
> + * a streaming file access pattern doesn't cause swapping.
> */
> if (sc->cache_trim_mode) {
> scan_balance = SCAN_FILE;
> @@ -3416,6 +3417,7 @@ static bool get_next_vma(unsigned long mask, unsigned long size, struct mm_walk
> {
> unsigned long start = round_up(*vm_end, size);
> unsigned long end = (start | ~mask) + 1;
> +
> VMA_ITERATOR(vmi, args->mm, start);

Like I said in patch 1, no new line is needed here.



--
Best Regards,
Yan, Zi