Skip to content

Commit 46d945a

Browse files
djbwtorvalds
authored andcommitted
mm: kill is_dev_zone() helper
Given there are no more usages of is_dev_zone() outside of 'ifdef CONFIG_ZONE_DEVICE' protection, kill off the compilation helper. Link: http://lkml.kernel.org/r/156092353211.979959.1489004866360828964.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <[email protected]> Reviewed-by: Oscar Salvador <[email protected]> Reviewed-by: Pavel Tatashin <[email protected]> Reviewed-by: Wei Yang <[email protected]> Acked-by: David Hildenbrand <[email protected]> Tested-by: Aneesh Kumar K.V <[email protected]> [ppc64] Cc: Michal Hocko <[email protected]> Cc: Logan Gunthorpe <[email protected]> Cc: Jane Chu <[email protected]> Cc: Jeff Moyer <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Toshi Kani <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 96da435 commit 46d945a

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

include/linux/mmzone.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -855,18 +855,6 @@ static inline int local_memory_node(int node_id) { return node_id; };
855855
*/
856856
#define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones)
857857

858-
#ifdef CONFIG_ZONE_DEVICE
859-
static inline bool is_dev_zone(const struct zone *zone)
860-
{
861-
return zone_idx(zone) == ZONE_DEVICE;
862-
}
863-
#else
864-
static inline bool is_dev_zone(const struct zone *zone)
865-
{
866-
return false;
867-
}
868-
#endif
869-
870858
/*
871859
* Returns true if a zone has pages managed by the buddy allocator.
872860
* All the reclaim decisions have to use this function rather than

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5926,7 +5926,7 @@ void __ref memmap_init_zone_device(struct zone *zone,
59265926
unsigned long start = jiffies;
59275927
int nid = pgdat->node_id;
59285928

5929-
if (WARN_ON_ONCE(!pgmap || !is_dev_zone(zone)))
5929+
if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE))
59305930
return;
59315931

59325932
/*

0 commit comments

Comments
 (0)