From: Sascha Hauer <s.hauer@pengutronix.de>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: barebox@lists.infradead.org,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH 06/10] ARM: a9m2410: convert to devfs_create_partitions
Date: Thu, 27 Feb 2014 14:17:30 +0100 [thread overview]
Message-ID: <20140227131729.GM17250@pengutronix.de> (raw)
In-Reply-To: <530D2660.6080104@gmail.com>
On Wed, Feb 26, 2014 at 12:25:20AM +0100, Sebastian Hesselbarth wrote:
> On 02/25/2014 11:51 PM, Uwe Kleine-König wrote:
> >Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >---
> > arch/arm/boards/a9m2410/a9m2410.c | 23 +++++++++++++++++------
> > 1 file changed, 17 insertions(+), 6 deletions(-)
> >
> >diff --git a/arch/arm/boards/a9m2410/a9m2410.c b/arch/arm/boards/a9m2410/a9m2410.c
> >index b2b6c87117a3..8d528cf60378 100644
> >--- a/arch/arm/boards/a9m2410/a9m2410.c
> >+++ b/arch/arm/boards/a9m2410/a9m2410.c
> >@@ -117,13 +117,24 @@ static int a9m2410_devices_init(void)
> > 16, IORESOURCE_MEM, NULL);
> >
> > #ifdef CONFIG_NAND
> >- /* ----------- add some vital partitions -------- */
> >- devfs_add_partition("nand0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self_raw");
> >- dev_add_bb_dev("self_raw", "self0");
> >-
> >- devfs_add_partition("nand0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env_raw");
> >- dev_add_bb_dev("env_raw", "env0");
> >+ devfs_create_partitions("nand0", (struct devfs_partition[]){
>
> nit: It would be even more readable, if you move the struct
> devfs_partition[] out of a9m2410_device_init() and reference
> it here instead, i.e.
>
> static struct devfs_partition a9m2410_nand_partitions[] = {
> ...
> { }
> };
>
> ...
>
> static int a9m2410_devices_init(void)
> {
> ...
> #ifdef CONFIG_NAND
> devfs_create_partitions("nand0", a9m2410_nand_partitions);
> #endif
> ...
>
> in here and the following patches.
+1
In this particular case the __maybe_unused can also be avoided with
if(IS_ENABLED(CONFIG_NAND))
devfs_create_partitions("nand0", a9m2410_nand_partitions);
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:[~2014-02-27 13:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 22:51 [PATCH 00/10] new partitioning helper Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 01/10] devfs: partitioning: add missing free in error path Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 02/10] devfs_add_partition: make flags parameter unsigned Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 03/10] Documentation: fix example call to devfs_add_partition Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 04/10] mtd/nand: constify filename parameter Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 05/10] devfs: partitioning: add new helper devfs_create_partitions Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 06/10] ARM: a9m2410: convert to devfs_create_partitions Uwe Kleine-König
2014-02-25 23:25 ` Sebastian Hesselbarth
2014-02-26 15:55 ` Uwe Kleine-König
2014-02-26 16:30 ` Sebastian Hesselbarth
2014-02-27 13:17 ` Sascha Hauer [this message]
2014-02-25 22:51 ` [PATCH 07/10] ARM: freescale-mx35-3-stack: " Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 08/10] ARM: pca100: " Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 09/10] ARM: pcm038: " Uwe Kleine-König
2014-02-25 22:51 ` [PATCH 10/10] ARM: sama5d3xek: " Uwe Kleine-König
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=20140227131729.GM17250@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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