[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141017105156.GF29470@pengutronix.de>
Date: Fri, 17 Oct 2014 12:51:56 +0200
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Yifan Zhang <yifan.zhangm@...il.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>, mark.rutland@....com,
lauraa@...eaurora.org, ganapatrao.kulkarni@...iumnetworks.com,
robh@...nel.org, leif.lindholm@...aro.org,
Yalin.Wang@...ymobile.com,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
linux-kernel@...r.kernel.org, Yifan Zhang <zhangyf@...vell.com>
Subject: Re: [PATCH] arm64: mm: use macro instead of if judgement of ZONE_DMA
Hello,
On Thu, Oct 16, 2014 at 05:19:43PM +0800, Yifan Zhang wrote:
> @@ -82,10 +82,10 @@ static void __init zone_sizes_init(unsigned long
> min, unsigned long max)
>
> memset(zone_size, 0, sizeof(zone_size));
>
>
>
> /* 4GB maximum for 32-bit only capable devices */
>
> - if (IS_ENABLED(CONFIG_ZONE_DMA)) {
>
> - max_dma = PFN_DOWN(max_zone_dma_phys());
>
> - zone_size[ZONE_DMA] = max_dma - min;
>
> - }
>
> +#ifdef CONFIG_ZONE_DMA
>
> + max_dma = PFN_DOWN(max_zone_dma_phys());
>
> + zone_size[ZONE_DMA] = max_dma - min;
>
> +#endif
Apart from your patch being broken (probably by your MUA or MTA) usually
if (IS_ENABLED(...)) is preferred over #ifdef because it doesn't stand
out over the other program source.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists