mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-23 15:38:02 -04:00
mm: improve code consistency with zonelist_* helper functions
Replace direct access to zoneref->zone, zoneref->zone_idx, or zone_to_nid(zoneref->zone) with the corresponding zonelist_* helper functions for consistency. No functional change. Link: https://lkml.kernel.org/r/20240729091717.464-1-shivankg@amd.com Co-developed-by: Shivank Garg <shivankg@amd.com> Signed-off-by: Shivank Garg <shivankg@amd.com> Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -1688,7 +1688,7 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist,
|
||||
zone = zonelist_zone(z))
|
||||
|
||||
#define for_next_zone_zonelist_nodemask(zone, z, highidx, nodemask) \
|
||||
for (zone = z->zone; \
|
||||
for (zone = zonelist_zone(z); \
|
||||
zone; \
|
||||
z = next_zones_zonelist(++z, highidx, nodemask), \
|
||||
zone = zonelist_zone(z))
|
||||
@@ -1724,7 +1724,7 @@ static inline bool movable_only_nodes(nodemask_t *nodes)
|
||||
nid = first_node(*nodes);
|
||||
zonelist = &NODE_DATA(nid)->node_zonelists[ZONELIST_FALLBACK];
|
||||
z = first_zones_zonelist(zonelist, ZONE_NORMAL, nodes);
|
||||
return (!z->zone) ? true : false;
|
||||
return (!zonelist_zone(z)) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user