Skip to contentSkip to conversation

mfd: simple-mfd-i2c: Fix linker error due to new mfd-core dependency

PATCH In review Tyler Hicks 4 participants 8 messages Nov 3, 2021 – Nov 4, 2021 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: simple-mfd-i2c: Fix linker error due to new mfd-core dependency

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/Kconfig +1 -0
index ca0edab91aeb..d2f345245538 100644
@@ -1194,6 +1194,7 @@ config MFD_SI476X_CORE
 config MFD_SIMPLE_MFD_I2C
 	tristate
 	depends on I2C
+	select MFD_CORE
 	select REGMAP_I2C
 	help
 	  This driver creates a single register map with the intention for it
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x

Alistair

Quoted 20 lines

---
drivers/mfd/Kconfig | 1 +

1 file changed, 1 insertion(+)
drivers/mfd/Kconfig +0 -0
index ca0edab91aeb..d2f345245538 100644
@@ -1194,6 +1194,7 @@ config MFD_SI476X_CORE

config MFD_SIMPLE_MFD_I2C
tristate
depends on I2C
+ select MFD_CORE
select REGMAP_I2C
help
This driver creates a single register map with the intention for it

Signature · 1 line
2.25.1
#2 lore raw
In reply to Tyler Hicks
Quoted 8 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Quoted 6 lines
Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Looks like the same change that has already been applied.

Could you rebase on top of the MFD tree please?

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw
Quoted 17 lines · Lee Jones
Quoted 8 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Quoted 6 lines
Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 3 lines

Looks like the same change that has already been applied.

Could you rebase on top of the MFD tree please?

Ah, that commit wasn't in for-mfd-next when I wrote up this patch yesterday.

I think that the Fixes line in that patch is wrong as I didn't see this issue in 5.10 and reverting c753ea31781a fixes the build failure.

Tyler

Quoted 7 lines
Signature · 5 lines
-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#4 lore raw
Quoted 21 lines · Tyler Hicks
Quoted 19 lines · Lee Jones
Quoted 8 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Quoted 6 lines
Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Looks like the same change that has already been applied.

Quoted 7 lines
Quoted 1 line

Could you rebase on top of the MFD tree please?

Ah, that commit wasn't in for-mfd-next when I wrote up this patch yesterday.

I think that the Fixes line in that patch is wrong as I didn't see this issue in 5.10 and reverting c753ea31781a fixes the build failure.

Hi Tyler, I would agree with you on the fixes tag. I messed that one up, c753ea31781a is the correct one.

Regards,
Robert

Quoted 10 lines

Tyler

Quoted 7 lines

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 7 lines
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: [email protected]
Web: www.sartura.hr
#5 lore raw
Quoted 24 lines · Robert Marko
Quoted 23 lines · Tyler Hicks
Quoted 20 lines · Lee Jones
Quoted 8 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Quoted 6 lines
Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Looks like the same change that has already been applied.

Could you rebase on top of the MFD tree please?

Quoted 8 lines
Quoted 5 lines

Ah, that commit wasn't in for-mfd-next when I wrote up this patch yesterday.

I think that the Fixes line in that patch is wrong as I didn't see this issue in 5.10 and reverting c753ea31781a fixes the build failure.

Hi Tyler, I would agree with you on the fixes tag. I messed that one up, c753ea31781a is the correct one.

All good. I fixed it for you.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#6 lore raw
Quoted 30 lines · Lee Jones
Quoted 27 lines · Robert Marko
Quoted 26 lines · Tyler Hicks
Quoted 17 lines · Lee Jones
Quoted 8 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Quoted 6 lines
Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 3 lines

Looks like the same change that has already been applied.

Could you rebase on top of the MFD tree please?

Ah, that commit wasn't in for-mfd-next when I wrote up this patch yesterday.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

I think that the Fixes line in that patch is wrong as I didn't see this issue in 5.10 and reverting c753ea31781a fixes the build failure.

Hi Tyler, I would agree with you on the fixes tag. I messed that one up, c753ea31781a is the correct one.

All good. I fixed it for you.

Thanks, sorry for the mess up.

Regards,
Robert

Quoted 6 lines

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 7 lines
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: [email protected]
Web: www.sartura.hr
#7 lore raw
In reply to Robert Marko
Quoted 24 lines · Robert Marko
Quoted 23 lines · Tyler Hicks
Quoted 20 lines · Lee Jones
Quoted 8 lines · Tyler Hicks

Select CONFIG_MFD_CORE from CONFIG_MFD_SIMPLE_MFD_I2C, now that simple-mfd-i2c.c calls devm_mfd_add_devices(), to fix the following linker error:

ld: drivers/mfd/simple-mfd-i2c.o: in function `simple_mfd_i2c_probe':
simple-mfd-i2c.c:(.text+0x62): undefined reference to `devm_mfd_add_devices'
make: *** [Makefile:1187: vmlinux] Error 1

Quoted 6 lines
Fixes c753ea31781a ("mfd: simple-mfd-i2c: Add support for registering devices via MFD cells")
Cc [email protected] # 5.15.x
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Looks like the same change that has already been applied.

Could you rebase on top of the MFD tree please?

Quoted 8 lines
Quoted 5 lines

Ah, that commit wasn't in for-mfd-next when I wrote up this patch yesterday.

I think that the Fixes line in that patch is wrong as I didn't see this issue in 5.10 and reverting c753ea31781a fixes the build failure.

Hi Tyler, I would agree with you on the fixes tag. I messed that one up, c753ea31781a is the correct one.

It is probably better to overshoot than undershoot with Fixes tags. :)

Lee, I don't know if you rebase that branch (I doubt it) but if you do to fix up the Fixes tag, please also add an explicit Cc: stable tag since this affects the new LTS release.

Tyler

Quoted 25 lines

Regards,
Robert

Quoted 10 lines

Tyler

Quoted 7 lines

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services

Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 7 lines
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: [email protected]
Web: www.sartura.hr