public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: linux-next: manual merge of the l2-mtd tree with the mtd tree
Date: Tue, 5 Jan 2016 13:05:18 +1100	[thread overview]
Message-ID: <20160105130518.2c06c514@canb.auug.org.au> (raw)

Hi Brian,

Today's linux-next merge of the l2-mtd tree got a conflict in:

  drivers/mtd/mtdcore.c

between commit:

  472b444eef93 ("mtd: fix cmdlinepart parser, early naming for auto-filled MTD")

from the mtd tree and commit:

  07fd2f871c5e ("mtd: partitions: pass around 'mtd_partitions' wrapper struct")

from the l2-mtd tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/mtd/mtdcore.c
index ffa288474820,89d811e7b04a..000000000000
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@@ -590,22 -589,20 +595,22 @@@ int mtd_device_parse_register(struct mt
  			      const struct mtd_partition *parts,
  			      int nr_parts)
  {
+ 	struct mtd_partitions parsed;
  	int ret;
- 	struct mtd_partition *real_parts = NULL;
  
 +	mtd_set_dev_defaults(mtd);
 +
- 	ret = parse_mtd_partitions(mtd, types, &real_parts, parser_data);
- 	if (ret <= 0 && nr_parts && parts) {
- 		real_parts = kmemdup(parts, sizeof(*parts) * nr_parts,
- 				     GFP_KERNEL);
- 		if (!real_parts)
- 			ret = -ENOMEM;
- 		else
- 			ret = nr_parts;
- 	}
- 	/* Didn't come up with either parsed OR fallback partitions */
- 	if (ret < 0) {
+ 	memset(&parsed, 0, sizeof(parsed));
+ 
+ 	ret = parse_mtd_partitions(mtd, types, &parsed, parser_data);
+ 	if ((ret < 0 || parsed.nr_parts == 0) && parts && nr_parts) {
+ 		/* Fall back to driver-provided partitions */
+ 		parsed = (struct mtd_partitions){
+ 			.parts		= parts,
+ 			.nr_parts	= nr_parts,
+ 		};
+ 	} else if (ret < 0) {
+ 		/* Didn't come up with parsed OR fallback partitions */
  		pr_info("mtd: failed to find partitions; one or more parsers reports errors (%d)\n",
  			ret);
  		/* Don't abort on errors; we can still use unpartitioned MTD */

             reply	other threads:[~2016-01-05  2:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05  2:05 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-03-15  0:58 linux-next: manual merge of the l2-mtd tree with the mtd tree Stephen Rothwell
2013-03-15  8:32 ` Artem Bityutskiy
2013-03-15  0:53 Stephen Rothwell
2012-07-17  1:00 Stephen Rothwell
2012-07-25 15:21 ` Gerlando Falauto
2012-07-25 15:26   ` David Woodhouse
2012-07-25 15:36     ` Gerlando Falauto
2012-07-25 15:39       ` David Woodhouse

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=20160105130518.2c06c514@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.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