lkml.org 
[lkml]   [2022]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2022-08-21 12:44    [W:0.236 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site