linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Apparent Kconfig bug for Maxim 77650 driver
@ 2020-01-03  5:36 Paul Gazzillo
  2020-01-03 11:43 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gazzillo @ 2020-01-03  5:36 UTC (permalink / raw)
  To: Bartosz Golaszewski, Lee Jones; +Cc: linux-kernel

It seems there is a Kconfig issue that causing a linking error for drivers/mfd/max77650.c.  It happens when CONFIG_MFD_MAX77650 is set (which controls drivers/mfd/max77650.c), but CONFIG_REGMAP_IRQ is not.  CONFIG_REMAP_IRQ controls drivers/base/regmap/regmap-irq.c, which has functions called by max77650.c.

In drivers/mfd/Kconfig, it looks like CONFIG_MFD_MAX77650 is meant to have "select CONFIG_REGMAP_IRQ" like several other configuration options from the same Kconfig file.

Steps to reproduce the bug for next-20191220 (also happens on other versions, e.g., v5.4.4):

  1. make allnoconfig  # using x86
  2. make menuconfig
    a. Enable device drivers->i2c support
    b. Enable device drivers->device tree and open firmware support
    c. Enable device drivers->multifunction devices->maxim MAX77650
  3. make  # should have a build error when linking vmlinux

This is the build error I get:

    ld: drivers/mfd/max77650.o: in function `max77650_i2c_probe':
    max77650.c:(.text+0xcb): undefined reference to `devm_regmap_add_irq_chip'
    ld: max77650.c:(.text+0xdb): undefined reference to `regmap_irq_get_domain'
    make: *** [Makefile:1079: vmlinux] Error 1

Is this a real bug or am I doing something wrong?

Best,
Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Apparent Kconfig bug for Maxim 77650 driver
  2020-01-03  5:36 Apparent Kconfig bug for Maxim 77650 driver Paul Gazzillo
@ 2020-01-03 11:43 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2020-01-03 11:43 UTC (permalink / raw)
  To: Paul Gazzillo; +Cc: Bartosz Golaszewski, Lee Jones, Linux Kernel Mailing List

pt., 3 sty 2020 o 06:45 Paul Gazzillo <paul@pgazz.com> napisał(a):
>
> It seems there is a Kconfig issue that causing a linking error for drivers/mfd/max77650.c.  It happens when CONFIG_MFD_MAX77650 is set (which controls drivers/mfd/max77650.c), but CONFIG_REGMAP_IRQ is not.  CONFIG_REMAP_IRQ controls drivers/base/regmap/regmap-irq.c, which has functions called by max77650.c.
>
> In drivers/mfd/Kconfig, it looks like CONFIG_MFD_MAX77650 is meant to have "select CONFIG_REGMAP_IRQ" like several other configuration options from the same Kconfig file.
>
> Steps to reproduce the bug for next-20191220 (also happens on other versions, e.g., v5.4.4):
>
>   1. make allnoconfig  # using x86
>   2. make menuconfig
>     a. Enable device drivers->i2c support
>     b. Enable device drivers->device tree and open firmware support
>     c. Enable device drivers->multifunction devices->maxim MAX77650
>   3. make  # should have a build error when linking vmlinux
>
> This is the build error I get:
>
>     ld: drivers/mfd/max77650.o: in function `max77650_i2c_probe':
>     max77650.c:(.text+0xcb): undefined reference to `devm_regmap_add_irq_chip'
>     ld: max77650.c:(.text+0xdb): undefined reference to `regmap_irq_get_domain'
>     make: *** [Makefile:1079: vmlinux] Error 1
>
> Is this a real bug or am I doing something wrong?
>
> Best,
> Paul

It's a bug, thanks for reporting. I just sent out a fix.

Best regards,
Bartosz Golaszewski

PS please set your e-mail client to wrap lines around 80 characters
when posting to LKML.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-03 11:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03  5:36 Apparent Kconfig bug for Maxim 77650 driver Paul Gazzillo
2020-01-03 11:43 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).