Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp183310imm; Wed, 3 Oct 2018 14:10:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV62HsUw5ZX3IOtKPRDb/GVAZW5mWp4xuayvLc1IthY5qfoKJXFWRGxVT/Eek97N0xRX4O+p2 X-Received: by 2002:a63:6054:: with SMTP id u81-v6mr2912816pgb.74.1538601054647; Wed, 03 Oct 2018 14:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538601054; cv=none; d=google.com; s=arc-20160816; b=lzvYGQcr0N/MBIoBrhppxH+giGcXnV2X6IzpLBBndDjQCB0cXcjgdgwLBQMobPb/x4 4sVKrqgp+Dt3X8wOK0505Z/s7+fgUJvH1P/kCzznOBIyViE7lqDhh42zilMRNU49U5lJ 9DNLNDfPmg4ixO1e3l+AJYWFEu6qkdh3t7/P/kGh0CZXz6TOLGKq61x1LiYriw+NCDKF mxHENfyYh9+tuytKeA/1SBZdShTz0pzSu74Clwaf3JNCrCHpWekah2N39SwfiSZTpTti DQJHdC9gxeP5K+uH5lbDTCtTukhvYGk4QQ9JP6y7PcnOPT/2kN/s9HHzeSH9r28hRXUq 8tmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Xn55fW+IQQnUIaZU8I2Yx6rt5GxkIFcKyBsGAUyAtxI=; b=hEBwXhUFn3ZS2D27stoJJYgEcsBfhpwtzero8vk1zz6R81ViOnvPrcAmrKptO4VACl L9oAxdJ0+7aZDZbF3oMaCA4wQefxSuLJc42DdeehA8/wM+1+VpVAOr8BIOwVuCCHFFZY 0+d6R/mailirEkqtq3iv3BB8AhC6jmgtsMHai4gkeZ1MKeKDTlyhXt4SDypbct1WRAnb R+tkBdUeLNylteh3izr42Nz/CAa1ZHmT5jQ5YMoorWSJ18H2UKuMpR8ahdVS7YS4amAh y3wlZAbkUBnFuoGWEflKFo7cALU1Vz5W1FP7PfjomK91CAPj/RZKcB9sRB0kEIpJfXw+ KNPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11-v6si2747174pgr.65.2018.10.03.14.10.38; Wed, 03 Oct 2018 14:10:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726182AbeJDEAh convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Oct 2018 00:00:37 -0400 Received: from mail.bootlin.com ([62.4.15.54]:49780 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725199AbeJDEAg (ORCPT ); Thu, 4 Oct 2018 00:00:36 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id D743D207F3; Wed, 3 Oct 2018 23:10:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 906762072B; Wed, 3 Oct 2018 23:10:20 +0200 (CEST) Date: Wed, 3 Oct 2018 23:10:21 +0200 From: Boris Brezillon To: Ricardo Ribalda Delgado Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Zhouyang Jia , linux-mtd@lists.infradead.org, open list Subject: Re: [PATCH v5 8/8] mtd: maps: gpio-addr-flash: Add support for device-tree devices Message-ID: <20181003231021.730ee909@bbrezillon> In-Reply-To: <20181003193859.23928-8-ricardo.ribalda@gmail.com> References: <20181003193859.23928-1-ricardo.ribalda@gmail.com> <20181003193859.23928-8-ricardo.ribalda@gmail.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 3 Oct 2018 21:38:59 +0200 Ricardo Ribalda Delgado wrote: > Allow creating gpio-addr-flash via device-tree and not just via platform > data. > > Option parsing has been moved to separated functions. > > Signed-off-by: Ricardo Ribalda Delgado > --- > drivers/mtd/maps/gpio-addr-flash.c | 95 +++++++++++++++++++++++++++--- > 1 file changed, 87 insertions(+), 8 deletions(-) > > diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c > index 9e370e3158cd..1be2df81087a 100644 > --- a/drivers/mtd/maps/gpio-addr-flash.c > +++ b/drivers/mtd/maps/gpio-addr-flash.c > @@ -7,6 +7,7 @@ > * > * Copyright © 2000 Nicolas Pitre > * Copyright © 2005-2009 Analog Devices Inc. > + * Copyright © 2018 Ricardo Ribalda Would you mind moving the copyright update to a separate patch? > + > +static void gf_device_parse_register(struct platform_device *pdev, > + struct async_state *state) > +{ > + static const char * const part_probe_types[] = { > + "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL }; > + struct device_node *dn; > + > + dn = pdev->dev.of_node; > + if (!dn) { > + struct physmap_flash_data *pdata; > + > + pdata = dev_get_platdata(&pdev->dev); > + mtd_device_parse_register(state->mtd, part_probe_types, NULL, > + pdata->parts, pdata->nr_parts); > + return; > + } > + > + mtd_device_parse_register(state->mtd, part_probe_types, NULL, NULL, 0); Looks like you keep ignoring the mtd_device_parse_register() return. Probably something you should fix at some point.