From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754133AbdDDP1J (ORCPT ); Tue, 4 Apr 2017 11:27:09 -0400 Received: from mga06.intel.com ([134.134.136.31]:7002 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbdDDP1I (ORCPT ); Tue, 4 Apr 2017 11:27:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,275,1486454400"; d="scan'208";a="1150798047" Message-ID: <1491319621.708.128.camel@linux.intel.com> Subject: Re: [tip:x86/platform 1/1] platform_bt.c:undefined reference to `gpiod_add_lookup_table' From: Andy Shevchenko To: Andy Shevchenko , Arnd Bergmann , Linus Walleij Cc: kbuild test robot , kbuild-all@01.org, "linux-kernel@vger.kernel.org" , tipbuild@zytor.com, Ingo Molnar Date: Tue, 04 Apr 2017 18:27:01 +0300 In-Reply-To: References: <201704030713.jb1PXu29%fengguang.wu@intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-04-03 at 12:44 +0300, Andy Shevchenko wrote: > On Mon, Apr 3, 2017 at 12:36 PM, Andy Shevchenko > wrote: > > On Mon, Apr 3, 2017 at 12:31 PM, Arnd Bergmann > > wrote: > > > On Mon, Apr 3, 2017 at 10:13 AM, Andy Shevchenko > > > wrote: > > > > On Mon, Apr 3, 2017 at 2:23 AM, kbuild test robot > > > > wrote: > > > > >    arch/x86/built-in.o: In function `tng_bt_sfi_setup': > > > > > > > platform_bt.c:(.init.text+0x13a30): undefined reference to > > > > > > > `gpiod_add_lookup_table' > > > > > > I'd guess it's a missing dependency on GPIOLIB > > +Cc: Linus. > > Apparently not this one. > > > > The module is purely built whenever HCIUART_BCM is defined which is > > a > > consumer of GPIO. > > And that one does not have a dependency. > > ...and they should not. So, there are two ways of fix this: > - add a stub for gpiod_add_lookup_table() for !GPIOLIB case, or > - add ifdeffery around this code here (with obvious increase of > ugliness). Linus, there is a (minor) issue with one of the user of gpiod_add_lookup_table(), i.e. we have a code which is either built-in or not compiled at all and it has some external dependency without having an explicit Kconfig option. The external dependency considers GPIOLIB as an optional, and thus some configurations might bring unresolved symbols. There are at least two solutions: - add a stub for gpiod_add_lookup_table() for !GPIOLIB case, or - add ifdeffery around this code here (with obvious increase of ugliness). What is your opinion on the case? -- Andy Shevchenko Intel Finland Oy