lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190612031825.24732-1-yuehaibing@huawei.com>
Date:   Wed, 12 Jun 2019 11:18:25 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <minyard@....org>, <arnd@...db.de>, <gregkh@...uxfoundation.org>,
        <Asmaa@...lanox.com>, <vadimp@...lanox.com>
CC:     <linux-kernel@...r.kernel.org>,
        <openipmi-developer@...ts.sourceforge.net>,
        YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH] ipmi: ipmb: Fix build error while CONFIG_I2C is set to m

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@...wei.com>
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: YueHaibing <yuehaibing@...wei.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ