Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/mm_init.c: drop 'nid' parameter from check_for_memory()

The node_id in pgdat has already been set in free_area_init_node(),
so use it internally instead of passing a redundant parameter.

Link: https://lkml.kernel.org/r/20230607032402.4679-1-haifeng.xu@shopee.com
Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Haifeng Xu and committed by
Andrew Morton
91ff4d75 bd5f79ab

+4 -4
+4 -4
mm/mm_init.c
··· 1724 1724 } 1725 1725 1726 1726 /* Any regular or high memory on that node ? */ 1727 - static void check_for_memory(pg_data_t *pgdat, int nid) 1727 + static void check_for_memory(pg_data_t *pgdat) 1728 1728 { 1729 1729 enum zone_type zone_type; 1730 1730 ··· 1732 1732 struct zone *zone = &pgdat->node_zones[zone_type]; 1733 1733 if (populated_zone(zone)) { 1734 1734 if (IS_ENABLED(CONFIG_HIGHMEM)) 1735 - node_set_state(nid, N_HIGH_MEMORY); 1735 + node_set_state(pgdat->node_id, N_HIGH_MEMORY); 1736 1736 if (zone_type <= ZONE_NORMAL) 1737 - node_set_state(nid, N_NORMAL_MEMORY); 1737 + node_set_state(pgdat->node_id, N_NORMAL_MEMORY); 1738 1738 break; 1739 1739 } 1740 1740 } ··· 1886 1886 /* Any memory on that node */ 1887 1887 if (pgdat->node_present_pages) 1888 1888 node_set_state(nid, N_MEMORY); 1889 - check_for_memory(pgdat, nid); 1889 + check_for_memory(pgdat); 1890 1890 } 1891 1891 1892 1892 memmap_init();