The memblock API provides dedicated helpers to set or clear a flag on a memory region, e.g. memblock_{mark,clear}_hotplug(). The memblock_{set,clear}_region_flags() functions are used only by the memblock internal function that adjusts the region flags. Drop these functions and use open-coded implementation instead.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -273,18 +273,6 @@ void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, · 272 unmodified lines | ||
| 273 | 273 | for_each_mem_range_rev(i, &memblock.memory, &memblock.reserved, \ |
| 274 | 274 | nid, flags, p_start, p_end, p_nid) |
| 275 | 275 | |
| 276 | −static inline void memblock_set_region_flags(struct memblock_region *r, | |
| 277 | − enum memblock_flags flags) | |
| 278 | −{ | |
| 279 | − r->flags |= flags; | |
| 280 | −} | |
| 281 | − | |
| 282 | −static inline void memblock_clear_region_flags(struct memblock_region *r, | |
| 283 | − enum memblock_flags flags) | |
| 284 | −{ | |
| 285 | − r->flags &= ~flags; | |
| 286 | −} | |
| 287 | − | |
| 288 | 276 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
| 289 | 277 | int memblock_set_node(phys_addr_t base, phys_addr_t size, |
| 290 | 278 | struct memblock_type *type, int nid); |