Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751276AbbLLFjd (ORCPT ); Sat, 12 Dec 2015 00:39:33 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35803 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbbLLFjc (ORCPT ); Sat, 12 Dec 2015 00:39:32 -0500 Date: Fri, 11 Dec 2015 21:39:18 -0800 From: Brian Norris To: Heiko Schocher Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Boris Brezillon , Frans Klaver Subject: Re: [PATCH for-4.4] mtd: fix cmdlinepart parser, early naming for auto-filled MTD Message-ID: <20151212053918.GA19361@brian-ubuntu> References: <1449878281-94986-1-git-send-email-computersforpeace@gmail.com> <566BA661.9000407@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <566BA661.9000407@denx.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1663 Lines: 45 On Sat, Dec 12, 2015 at 05:45:21AM +0100, Heiko Schocher wrote: > Am 12.12.2015 um 00:58 schrieb Brian Norris: > >Commit 807f16d4db95 ("mtd: core: set some defaults when dev.parent is > >set") attempted to provide some default settings for MTDs that > > (a) assign the parent device and > > (b) don't provide their own name or owner > > > >However, this isn't a perfect drop-in replacement for the boilerplate > >found in some drivers, because the MTD name is used by partition > >parsers like cmdlinepart, but the name isn't set until add_mtd_device(), > >after the parsing is completed. This means cmdlinepart sees a NULL name > >and therefore will not work properly. > > > >Fix this by moving the default name and owner assignment to be first in > >the MTD registration process. > > > >Fixes: 807f16d4db95 ("mtd: core: set some defaults when dev.parent is set") > >Reported-by: Heiko Schocher > >Signed-off-by: Brian Norris > >Cc: Heiko Schocher > >Cc: Frans Klaver > >--- > >Heiko, can you provide testing feedback (e.g., 'Tested-by: ...')? > > Sorry, does not work for me: > > Based on: > pollux:linux hs [20151212] $ git describe master > v4.4-rc4-135-gb9d8545 > > and this patch, shows the same problem, [...] Ugh, I see the problem. In nand_base.c, nand_get_flash_type(): if (!mtd->name) mtd->name = type->name; 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/