From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, sam@ravnborg.org
Subject: Re: [PATCH v2 06/10] ARM: at91: remove at91sam9g45_get_ddram_size helper
Date: Wed, 3 Apr 2019 09:18:00 +0200 [thread overview]
Message-ID: <20190403071800.dczv5jnlqbg5qodz@pengutronix.de> (raw)
In-Reply-To: <20190401093106.4595-7-a.fatoum@pengutronix.de>
On Mon, Apr 01, 2019 at 11:31:02AM +0200, Ahmad Fatoum wrote:
> Substitute the current #ifdefery in at91sam9_ddrsdr.h by
> open-coding at91sam9g45_get_ddram_size wherever it was called.
>
> Suggested-by: Sascha Hauer <s.hauer@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> -#ifdef CONFIG_SOC_AT91SAM9G45
> -#include <mach/at91sam9g45.h>
> -static inline u32 at91sam9g45_get_ddram_size(int bank)
> -{
> - switch (bank) {
> - case 0:
> - return at91_get_ddram_size(IOMEM(AT91SAM9G45_BASE_DDRSDRC0), false);
> - case 1:
> - return at91_get_ddram_size(IOMEM(AT91SAM9G45_BASE_DDRSDRC1), false);
> - default:
> - return 0;
> - }
> -}
> -#else
> -static inline u32 at91sam9g45_get_ddram_size(int bank)
> -{
> - return 0;
> -}
> -#endif
Indeed you can remove the #ifdefs, but wouldn't it look nicer just to
keep at91sam9g45_get_ddram_size() and friends?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-04-03 7:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 9:30 [PATCH v2 00/10] ARM: at91: misc fixes and cleanup Ahmad Fatoum
2019-04-01 9:30 ` [PATCH v2 01/10] ARM: at91: replace __raw_{readl, writel} of peripherals with readl, writel Ahmad Fatoum
2019-04-01 9:30 ` [PATCH v2 02/10] ARM: at91: debug_ll: make UART base address configurable Ahmad Fatoum
2019-04-01 9:30 ` [PATCH v2 03/10] arm: sama5d4: fix stack setup Ahmad Fatoum
2019-04-01 9:31 ` [PATCH v2 04/10] ARM: at91: fix at91sama5_get_ddram_size for sama5d4 Ahmad Fatoum
2019-04-01 9:31 ` [PATCH v2 05/10] ARM: at91: remove duplicate get_ddram_size code Ahmad Fatoum
2019-04-01 9:31 ` [PATCH v2 06/10] ARM: at91: remove at91sam9g45_get_ddram_size helper Ahmad Fatoum
2019-04-01 20:45 ` Sam Ravnborg
2019-04-03 7:18 ` Sascha Hauer [this message]
2019-04-03 9:56 ` Ahmad Fatoum
2019-04-03 10:11 ` Sascha Hauer
2019-04-01 9:31 ` [PATCH v2 07/10] ARM: at91: remove at91sam9n12_get_ddram_size helper Ahmad Fatoum
2019-04-01 20:45 ` Sam Ravnborg
2019-04-01 9:31 ` [PATCH v2 08/10] ARM: at91: remove at91sam9x5_get_ddram_size helper Ahmad Fatoum
2019-04-01 20:46 ` Sam Ravnborg
2019-04-01 9:31 ` [PATCH v2 09/10] ARM: at91: remove at91sama5_get_ddram_size helper Ahmad Fatoum
2019-04-01 20:46 ` Sam Ravnborg
2019-04-01 9:31 ` [PATCH v2 10/10] clk: at91: fix warning about missing const-safety Ahmad Fatoum
2019-04-01 20:48 ` Sam Ravnborg
2019-04-01 21:36 ` Ahmad Fatoum
2019-04-01 21:34 ` [PATCH v2 11/10] " Ahmad Fatoum
2019-04-02 16:37 ` Sam Ravnborg
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=20190403071800.dczv5jnlqbg5qodz@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sam@ravnborg.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