From patchwork Wed Jan 13 20:39:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 8027981 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA3BA9F744 for ; Wed, 13 Jan 2016 20:41:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFDB8204E0 for ; Wed, 13 Jan 2016 20:41:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F167B204D9 for ; Wed, 13 Jan 2016 20:41:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJSCl-0001G3-Tb; Wed, 13 Jan 2016 20:39:43 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJSCi-0000uQ-M0 for linux-arm-kernel@lists.infradead.org; Wed, 13 Jan 2016 20:39:41 +0000 Received: from akpm3.mtv.corp.google.com (unknown [216.239.45.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 420BCA81; Wed, 13 Jan 2016 20:39:19 +0000 (UTC) Date: Wed, 13 Jan 2016 12:39:18 -0800 From: Andrew Morton To: Arnd Bergmann Subject: Re: [PATCH] logfs: clarify MTD dependency Message-Id: <20160113123918.544497b48bf4c03591c75747@linux-foundation.org> In-Reply-To: <5776957.XLg438VUOx@wuerfel> References: <5776957.XLg438VUOx@wuerfel> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160113_123940_763006_EEF896B9 X-CRM114-Status: GOOD ( 17.36 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kbuild@vger.kernel.org, Prasad Joshi , Randy Dunlap , linux-kernel@vger.kernel.org, mmarek@suse.com, Peter Chen , Joern Engel , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 13 Jan 2016 14:25:55 +0100 Arnd Bergmann wrote: > After a change to the way that composite modules work, we get > a logfs build error: > > fs/built-in.o: In function `logfs_mount': > :(.text+0x139d34): undefined reference to `logfs_get_sb_mtd' > fs/built-in.o: In function `logfs_get_sb_bdev': > :(.text+0x13aa08): undefined reference to `logfs_get_sb_mtd' > > This patch avoids the error by changing the dependencies of > logfs in a way that we can no longer configure logfs as built-in > when the MTD core is a loadable module, while leaving the > dependency to require at least one of MTD or BLOCK to be > enabled. > > Another patch tried to work around the problem, but accidentally > dropped the dependency on 'BLOCK || MTD', allowing the file > system to be built if neither is selected. > > Signed-off-by: Arnd Bergmann > Fixes: cf4f21938e13 ("kbuild: Allow to specify composite modules with modname-m") > Fixes: e6be296f680c ("logfs: fix logfs build errors and dependencies") Randy's "logfs: fix logfs build errors and dependencies" is an only-in-mm thing. So it would make sense to combine the two patches into a single one and to give that an appropriate changelog. How does this look? (Primary author was chosen randomly) From: Arnd Bergmann Subject: logfs: fix logfs build errors and dependencies Fix build errors that happen when CONFIG_LOGFS=y and CONFIG_MTD=m: fs/built-in.o: In function `logfs_mount': super.c:(.text+0x92a6f): undefined reference to `logfs_get_sb_mtd' fs/built-in.o: In function `logfs_get_sb_bdev': (.text+0x93530): undefined reference to `logfs_get_sb_mtd' This patch avoids the error by changing the dependencies of logfs in a way that we can no longer configure logfs as built-in when the MTD core is a loadable module, while leaving the dependency to require at least one of MTD or BLOCK to be enabled. Signed-off-by: Arnd Bergmann Signed-off-by: Randy Dunlap Cc: Michal Marek Cc: Peter Chen Cc: Randy Dunlap Cc: Joern Engel Cc: Prasad Joshi Signed-off-by: Andrew Morton --- fs/logfs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/logfs/Kconfig~logfs-fix-logfs-build-errors-and-dependencies fs/logfs/Kconfig --- a/fs/logfs/Kconfig~logfs-fix-logfs-build-errors-and-dependencies +++ a/fs/logfs/Kconfig @@ -1,6 +1,6 @@ config LOGFS tristate "LogFS file system" - depends on (MTD || BLOCK) + depends on MTD || (!MTD && BLOCK) select ZLIB_INFLATE select ZLIB_DEFLATE select CRC32