From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762835AbcINP3w (ORCPT ); Wed, 14 Sep 2016 11:29:52 -0400 Received: from smtp2.megiteam.pl ([213.189.52.193]:53170 "EHLO smtp2.megiteam.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761275AbcINP3v (ORCPT ); Wed, 14 Sep 2016 11:29:51 -0400 X-Greylist: delayed 1209 seconds by postgrey-1.27 at vger.kernel.org; Wed, 14 Sep 2016 11:29:51 EDT Subject: Re: [PATCH] [RFC] irqchip or mfd/tps65217: fix link error To: Arnd Bergmann , Thomas Gleixner References: <20160914084202.1032264-1-arnd@arndb.de> <3153379.K6IZxfs9ll@wuerfel> Cc: Lee Jones , "Andrew F. Davis" , Marc Zyngier , Daniel Lezcano , linux-kernel@vger.kernel.org, Grygorii Strashko , Tony Lindgren From: Marcin Niestroj Message-ID: <91092c25-cad2-0b75-fae6-9088cfe23297@grinn-global.com> Date: Wed, 14 Sep 2016 17:09:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <3153379.K6IZxfs9ll@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.09.2016 15:56, Arnd Bergmann wrote: > On Wednesday, September 14, 2016 11:31:17 AM CEST Thomas Gleixner wrote: >> On Wed, 14 Sep 2016, Arnd Bergmann wrote: >>> Building tps65217 as a loadable module (as done in allmodconfig) >>> now fails after we started calling irq_set_parent(): >>> >>> ERROR: "irq_set_parent" [drivers/mfd/tps65217.ko] undefined! >>> >>> The two obvious workarounds are either to force the driver >>> to be built-in, or to make that symbol exported to modules. >>> >>> As it's not clear to me if either of them would be acceptable, >>> I'm sending both of them here, please comment on which one >>> you want to have, or whether the driver should handle this >>> differently and not call irq_set_parent() at all. >> >> The question is why it needs to call that. But if it's justified, then I'm >> not opposed to export it. > > Ok. I just noticed that I forgot to put the right people on Cc > that worked on the patch originally, fixed that now. > > My other approach of making the symbol "bool" in the meantime has > caused another problem when CONFIG_I2C=m: > > drivers/mfd/tps65217.o: In function `tps65217_init': > tps65217.c:(.init.text+0x8): undefined reference to `i2c_register_driver' > drivers/mfd/tps65217.o: In function `tps65217_probe': > tps65217.c:(.text.tps65217_probe+0x94): undefined reference to `__devm_regmap_init_i2c' > > so the dependency would be "depends on I2C=y", getting increasingly > ugly. I'll let Marcin or Grygorii reply on why the call is needed, > we can then either export the symbol or change the code. > > Arnd > I have added irq_set_parent() similarly as in drivers/base/regmap/regmap-irq.c But to be honest I am not sure what it really does in case of tps65217. -- Marcin Niestroj