public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipmi: ipmb: Fix build error while CONFIG_I2C is set to m
@ 2019-06-12  3:18 YueHaibing
  2019-06-12 12:21 ` Corey Minyard
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-06-12  3:18 UTC (permalink / raw)
  To: minyard, arnd, gregkh, Asmaa, vadimp
  Cc: linux-kernel, openipmi-developer, YueHaibing

If CONFIG_I2C is m and CONFIG_I2C_SLAVE is y,
building with CONFIG_IPMB_DEVICE_INTERFACE setting to
y will fail:

drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_remove':
ipmb_dev_int.c: undefined reference to `i2c_slave_unregister'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_write':
ipmb_dev_int.c: undefined reference to `i2c_smbus_write_block_data'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_probe':
ipmb_dev_int.c: undefined reference to `i2c_slave_register'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_init':
ipmb_dev_int.c: undefined reference to `i2c_register_driver'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_exit':
ipmb_dev_int.c: undefined reference to `i2c_del_driver'

Add I2C Kconfig dependency to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/char/ipmi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
index 987191b..4bad061 100644
--- a/drivers/char/ipmi/Kconfig
+++ b/drivers/char/ipmi/Kconfig
@@ -135,6 +135,7 @@ config ASPEED_BT_IPMI_BMC
 
 config IPMB_DEVICE_INTERFACE
 	tristate 'IPMB Interface handler'
+	depends on I2C
 	depends on I2C_SLAVE
 	help
 	  Provides a driver for a device (Satellite MC) to
-- 
2.7.4



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

* Re: [PATCH] ipmi: ipmb: Fix build error while CONFIG_I2C is set to m
  2019-06-12  3:18 [PATCH] ipmi: ipmb: Fix build error while CONFIG_I2C is set to m YueHaibing
@ 2019-06-12 12:21 ` Corey Minyard
  0 siblings, 0 replies; 2+ messages in thread
From: Corey Minyard @ 2019-06-12 12:21 UTC (permalink / raw)
  To: YueHaibing; +Cc: arnd, gregkh, Asmaa, vadimp, linux-kernel, openipmi-developer

On Wed, Jun 12, 2019 at 11:18:25AM +0800, YueHaibing wrote:
> If CONFIG_I2C is m and CONFIG_I2C_SLAVE is y,
> building with CONFIG_IPMB_DEVICE_INTERFACE setting to
> y will fail:

Ok, I have added this to my linux-next tree.

-corey

> 
> drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_remove':
> ipmb_dev_int.c: undefined reference to `i2c_slave_unregister'
> drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_write':
> ipmb_dev_int.c: undefined reference to `i2c_smbus_write_block_data'
> drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_probe':
> ipmb_dev_int.c: undefined reference to `i2c_slave_register'
> drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_init':
> ipmb_dev_int.c: undefined reference to `i2c_register_driver'
> drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_exit':
> ipmb_dev_int.c: undefined reference to `i2c_del_driver'
> 
> Add I2C Kconfig dependency to fix this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 51bd6f291583 ("Add support for IPMB driver")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/char/ipmi/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/char/ipmi/Kconfig b/drivers/char/ipmi/Kconfig
> index 987191b..4bad061 100644
> --- a/drivers/char/ipmi/Kconfig
> +++ b/drivers/char/ipmi/Kconfig
> @@ -135,6 +135,7 @@ config ASPEED_BT_IPMI_BMC
>  
>  config IPMB_DEVICE_INTERFACE
>  	tristate 'IPMB Interface handler'
> +	depends on I2C
>  	depends on I2C_SLAVE
>  	help
>  	  Provides a driver for a device (Satellite MC) to
> -- 
> 2.7.4
> 
> 

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

end of thread, other threads:[~2019-06-12 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-12  3:18 [PATCH] ipmi: ipmb: Fix build error while CONFIG_I2C is set to m YueHaibing
2019-06-12 12:21 ` Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox