Messages in this thread | | | Date | Sun, 21 Aug 2022 12:43:21 +0200 | From | Christoph Hellwig <> | Subject | Re: [PATCH 3/3] dma-pool: limit DMA and DMA32 zone size pools |
| |
On Wed, Aug 17, 2022 at 01:50:09PM +0100, Robin Murphy wrote: >> +#if defined(CONFIG_ZONE_DMA) || defined(CONFIG_ZONE_DMA32) > > This #ifdeffery seems horribly clunky - I think it would be much nicer to > mark this __maybe_unused, and preserve the has_managed_dma/IS_ENABLED logic > below.
>> static int __init dma_atomic_pool_init(void) >> { >> + unsigned long nr_zone_dma_pages, nr_zone_dma32_pages; > > ...otherwise, I expect the buildbots will be along shortly with unused > variable warnings for these :)
Amazingly they haven't complained yet, even if they should. But simple IS_ENABLED won't work either as the ZONE_DMA / ZONE_DMA32 constants are not defined unless the corresponding config options are set. I'll see what I can do here using helpers.
| |