From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mm: use macro instead of if judgement of ZONE_DMA
Date: Fri, 17 Oct 2014 12:51:56 +0200 [thread overview]
Message-ID: <20141017105156.GF29470@pengutronix.de> (raw)
In-Reply-To: <CAGZxSSRsYYNURnVB1fpGSTMA7WJMdy=Cmt1pj0Q=69ahHEsO1w@mail.gmail.com>
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/ |
next prev parent reply other threads:[~2014-10-17 10:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 9:19 [PATCH] arm64: mm: use macro instead of if judgement of ZONE_DMA Yifan Zhang
2014-10-17 10:51 ` Uwe Kleine-König [this message]
2014-10-17 11:23 ` Yifan Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141017105156.GF29470@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox