From patchwork Fri Nov 27 14:14:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 7713531 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 57A039F1D3 for ; Fri, 27 Nov 2015 14:16:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7215020574 for ; Fri, 27 Nov 2015 14:16:37 +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 4FEB8205B3 for ; Fri, 27 Nov 2015 14:16:33 +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 1a2JnO-00080M-RD; Fri, 27 Nov 2015 14:14:42 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a2JnA-0007mo-S0 for linux-arm-kernel@lists.infradead.org; Fri, 27 Nov 2015 14:14:30 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E1CE5AB13; Fri, 27 Nov 2015 14:12:26 +0000 (UTC) Received: by sepie.suse.cz (Postfix, from userid 10020) id 3C95740835; Fri, 27 Nov 2015 15:14:06 +0100 (CET) Date: Fri, 27 Nov 2015 15:14:06 +0100 From: Michal Marek To: Arnd Bergmann Subject: Re: [PATCH] logfs: clarify MTD dependency Message-ID: <20151127141406.GA29886@sepie.suse.cz> References: <9365895.IkncCfXjo6@wuerfel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9365895.IkncCfXjo6@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151127_061429_205467_8023A04B X-CRM114-Status: GOOD ( 19.09 ) X-Spam-Score: -2.6 (--) 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-kernel@vger.kernel.org, =?iso-8859-1?Q?J=F6rn?= Engel , Prasad Joshi , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.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, T_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 Fri, Nov 27, 2015 at 02:54:53PM +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. Hi Arnd, I hit this as well and was about to submit a slightly different fix. Can you try the logfs portion of the below patch? Proper changelog is to be done, but the gist of the patch is that IS_REACHABLE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO=y or we are building a module and CONFIG_FOO=m. Michal From 63e7ab41e3958e753277728acbe15faf35a5374e Mon Sep 17 00:00:00 2001 From: Michal Marek Date: Fri, 27 Nov 2015 15:08:29 +0100 Subject: [PATCH] kbuild: Use IS_REACHABLE to handle objname-m composite objects Fixes: cf4f21938e13 ("kbuild: Allow to specify composite modules with modname-m") Signed-off-by: Michal Marek --- drivers/misc/ibmasm/ibmasm.h | 2 +- drivers/usb/chipidea/otg_fsm.h | 2 +- fs/logfs/logfs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h index 5bd127727d8e..0f4c43a8543e 100644 --- a/drivers/misc/ibmasm/ibmasm.h +++ b/drivers/misc/ibmasm/ibmasm.h @@ -211,7 +211,7 @@ void ibmasmfs_unregister(void); void ibmasmfs_add_sp(struct service_processor *sp); /* uart */ -#if IS_ENABLED(CONFIG_SERIAL_8250) +#if IS_REACHABLE(CONFIG_SERIAL_8250) void ibmasm_register_uart(struct service_processor *sp); void ibmasm_unregister_uart(struct service_processor *sp); #else diff --git a/drivers/usb/chipidea/otg_fsm.h b/drivers/usb/chipidea/otg_fsm.h index 262d6ef8df7c..44506e4aa11f 100644 --- a/drivers/usb/chipidea/otg_fsm.h +++ b/drivers/usb/chipidea/otg_fsm.h @@ -62,7 +62,7 @@ /* SSEND time before SRP */ #define TB_SSEND_SRP (1500) /* minimum 1.5 sec, section:5.1.2 */ -#if IS_ENABLED(CONFIG_USB_OTG_FSM) +#if IS_REACHABLE(CONFIG_USB_OTG_FSM) int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci); int ci_otg_fsm_work(struct ci_hdrc *ci); diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h index 23f961a8fb92..2fcd487a4ab2 100644 --- a/fs/logfs/logfs.h +++ b/fs/logfs/logfs.h @@ -485,7 +485,7 @@ static inline int logfs_get_sb_bdev(struct logfs_super *s, #endif /* dev_mtd.c */ -#if IS_ENABLED(CONFIG_MTD) +#if IS_REACHABLE(CONFIG_MTD) int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr); #else static inline int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr)