From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.sigma-star.at ([95.130.255.111]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dzkcs-0001io-6z for linux-mtd@lists.infradead.org; Wed, 04 Oct 2017 14:26:20 +0000 From: Richard Weinberger To: Boris Brezillon Cc: David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , linux-mtd@lists.infradead.org, "Mario J. Rugiero" Subject: Re: [PATCH 1/2] mtd: Make sure MTD objects always have a valid debugfs dir Date: Wed, 04 Oct 2017 16:26:21 +0200 Message-ID: <16207457.a1XvOnd0Ms@blindfold> In-Reply-To: <20171004155653.46a246b1@bbrezillon> References: <20171004135239.16316-1-boris.brezillon@free-electrons.com> <20171004155342.32e096b8@bbrezillon> <20171004155653.46a246b1@bbrezillon> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am Mittwoch, 4. Oktober 2017, 15:56:53 CEST schrieb Boris Brezillon: > On Wed, 4 Oct 2017 15:53:42 +0200 > > Boris Brezillon wrote: > > On Wed, 4 Oct 2017 15:52:38 +0200 > > > > Boris Brezillon wrote: > > > Master MTD devices are not registered to MTD subsystem if they are > > > exposing MTD partitions unless the CONFIG_MTD_PARTITIONED_MASTER option > > > is enabled. > > > > > > This lead to a weird situation where some MTD device drivers are trying > > > to add debugfs files to the master MTD device, but this device has no > > > valid debugfs directory. > > > > > > Rework the core logic to do most of the MTD registration steps > > > (including debugfs dir creation) except the registration to the device > > > model, so that master devices are never exposed to the outside world > > > but are still able to expose debugfs entries. > > > > > > These devices will be exposed as mtd-hiddenX in the mtd debugfs dir. > > > Note that X is unique within the hidden MTD device pool but can collide > > > with ids of exposed MTD devs. > > > > > > This commit fixes a bug introduced by commit e8e3edb95ce6 ("mtd: create > > > per-device and module-scope debugfs entries") which is preventing > > > nandsim from loading when CONFIG_DEBUG_FS is enabled. > > > > > > Fixes: e8e3edb95ce6 ("mtd: create per-device and module-scope debugfs > > > entries")> > > Oops, I forgot > > > > Reported-by: Richard Weinberger > > and > > Cc: > > :-/ Tested-by: Richard Weinberger Thanks, //richard