[Intel-gfx] [drm-intel:topic/crc-pmic 2/7] intel_soc_pmic_core.c:undefined reference to `gpiod_remove_lookup_table'

Daniel Vetter daniel at ffwll.ch
Wed Jul 22 01:23:51 PDT 2015


On Tue, Jul 21, 2015 at 11:32:47PM +0530, Kumar, Shobhit wrote:
> On Tuesday 21 July 2015 11:10 PM, Daniel Vetter wrote:
> >On Tue, Jul 21, 2015 at 09:17:21PM +0530, Kumar, Shobhit wrote:
> >>On Tuesday 21 July 2015 07:35 PM, Daniel Vetter wrote:
> >>>On Tue, Jul 21, 2015 at 07:22:37PM +0800, kbuild test robot wrote:
> >>>>tree:   git://anongit.freedesktop.org/drm-intel topic/crc-pmic
> >>>>head:   b029e66fa8e39ba10dcc47b114be8da8b082493b
> >>>>commit: 61dd2ca2d44e493b050adbbb75bc50db11c367dd [2/7] mfd: intel_soc_pmic_core: Add lookup table for Panel Control as GPIO signal
> >>>>config: x86_64-randconfig-i0-201529 (attached as .config)
> >>>>reproduce:
> >>>>   git checkout 61dd2ca2d44e493b050adbbb75bc50db11c367dd
> >>>>   # save the attached .config to linux build tree
> >>>>   make ARCH=x86_64
> >>>>
> >>>>All error/warnings (new ones prefixed by >>):
> >>>>
> >>>>    drivers/built-in.o: In function `intel_soc_pmic_i2c_remove':
> >>>>>>intel_soc_pmic_core.c:(.text+0xb7cf2): undefined reference to `gpiod_remove_lookup_table'
> >>>>    drivers/built-in.o: In function `intel_soc_pmic_i2c_probe':
> >>>>>>intel_soc_pmic_core.c:(.text+0xb7dd9): undefined reference to `gpiod_add_lookup_table'
> >>>
> >>>Can you pls fix this up witha follow-up that I can squash into the topic
> >>>branch here?
> >>>
> >>
> >>Basically CONFIG_GPIOLIB is not set here. I will enclose the
> >>gpiod_add_lookup_table call and all related definitions in #ifdef
> >>CONFIG_GPIOLIB in my follow up patch for the topic branch.
> >
> >No #ifdef in code. Either add a select or depends here (depending upon
> >what everyone else does), or add dummy static inline functions in header
> >files when GPIOLIB=n. But wrapping actual code in #ifdefs is very frowned
> >upon in linux (and I personally agree, it just makes the code much harder
> >to read).
> 
> Yes, agree. On after thought I was planning to add select GPIOLIB for
> INTEL_SOC_PMIC

I haven't found any select GPIOLIB anywhere at all, everyone else uses
depends. And it's generally bad style to mix select and depends. I'd just
go with a depends.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list