Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754595AbbG0Uj3 (ORCPT ); Mon, 27 Jul 2015 16:39:29 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33130 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbbG0Uj2 (ORCPT ); Mon, 27 Jul 2015 16:39:28 -0400 Date: Mon, 27 Jul 2015 13:39:24 -0700 From: Brian Norris To: Michal Suchanek Cc: David Woodhouse , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] mtd: ofpart: do not fail probe when no partitions exist Message-ID: <20150727203924.GQ8876@google.com> References: <2feb6039b908bbe7daf98c0fc3b7c8f725c36ac3.1438028045.git.hramrach@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2feb6039b908bbe7daf98c0fc3b7c8f725c36ac3.1438028045.git.hramrach@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1978 Lines: 57 On Mon, Jul 27, 2015 at 08:30:43PM -0000, Michal Suchanek wrote: ... > The controller-data node contains no partition information and no other > subnodes with partition information exist. > > The ofpart code returns an error when there are subnodes of the flash DT > node but no partitions are found. This error is then propagated to > mtdpart which propagetes it to MTD probe which fails probing the flash > device. > > Change this condition to a warning so that flash without partitions can > be accessed on Exynos with ofpart support compiled in. You never replied to my suggestion here: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/352206.html Particularly, "just define a proper compatibile property for [the 'controller-data'] subnode, and ofpart.c will naturally handle this". > Signed-off-by: Michal Suchanek > > -- > - add more verbose explanation > --- > drivers/mtd/ofpart.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c > index aa26c32..a29d29f 100644 > --- a/drivers/mtd/ofpart.c > +++ b/drivers/mtd/ofpart.c > @@ -94,10 +94,10 @@ static int parse_ofpart_partitions(struct mtd_info *master, > > if (!i) { > of_node_put(pp); > - pr_err("No valid partition found on %s\n", node->full_name); > + pr_warn("No valid partition found on %s\n", node->full_name); > kfree(*pparts); > *pparts = NULL; > - return -EINVAL; > + return 0; I don't really like this, since it can turn other invalid device trees into a silent fallback. I'd really prefer we make it easy to tell the difference between a MTD partition subnode and another foo-bar subnode. > } > > return nr_parts; Brian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/