Skip to contentSkip to conversation

qlcnic: clarify hwmon Kconfig dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Apr 30, 2014 – May 2, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qlcnic: clarify hwmon Kconfig dependency

commit 1f0f467b670e "qlcnic: Add hwmon interface to export board temperature" introduced a randconfig build error in the case when the hwmon framework is built as a module and the qlcnic driver itself is built-in:

drivers/built-in.o: In function `qlcnic_register_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1301: undefined reference to hwmon_device_register_with_groups' drivers/built-in.o: In function qlcnic_unregister_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1309: undefined reference to `hwmon_device_unregister'

This changes the Kconfig logic to enforce that the qlcnic hwmon support can only be enabled if it is possible to successfully build it.

drivers/net/ethernet/qlogic/Kconfig +1 -0
index 0482adb..9493824 100644
@@ -69,6 +69,7 @@ config QLCNIC_VXLAN
 config QLCNIC_HWMON
 	bool "QLOGIC QLCNIC 82XX and 83XX family HWMON support"
 	depends on QLCNIC && HWMON
+	depends on QLCNIC=m || HWMON=y
 	default y
 	---help---
 	  This configuration parameter can be used to read the
#1 lore raw
Quoted 27 lines

commit 1f0f467b670e "qlcnic: Add hwmon interface to export board temperature" introduced a randconfig build error in the case when the hwmon framework is built as a module and the qlcnic driver itself is built-in:

drivers/built-in.o: In function `qlcnic_register_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1301: undefined reference to hwmon_device_register_with_groups' drivers/built-in.o: In function qlcnic_unregister_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1309: undefined reference to `hwmon_device_unregister'

This changes the Kconfig logic to enforce that the qlcnic hwmon support can only be enabled if it is possible to successfully build it.

drivers/net/ethernet/qlogic/Kconfig +0 -0
index 0482adb..9493824 100644
@@ -69,6 +69,7 @@ config QLCNIC_VXLAN
Quoted 9 lines

config QLCNIC_HWMON
bool "QLOGIC QLCNIC 82XX and 83XX family HWMON support" depends on QLCNIC && HWMON
+ depends on QLCNIC=m || HWMON=y
default y
---help---
This configuration parameter can be used to read the

Can we make it into an one line expression as done in few other cases:

(quoted diff) +0 -0

b/drivers/net/ethernet/qlogic/K
index b818432..d49cba1 100644

drivers/net/ethernet/qlogic/Kconfig +1 -1
@@ -68,7 +68,7 @@ config QLCNIC_VXLAN
 
 config QLCNIC_HWMON
        bool "QLOGIC QLCNIC 82XX and 83XX family HWMON support"
-       depends on QLCNIC && HWMON
+       depends on QLCNIC && HWMON && !(QLCNIC=y && HWMON=m)
        default y
        ---help---
          This configuration parameter can be used to read the

________________________________

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

maintainer
#2 lore raw

From: Harish Patil <[email protected]>
Date: Wed, 30 Apr 2014 15:51:27 +0000

Quoted 1 line

Can we make it into an one line expression as done in few other cases:

...

drivers/net/ethernet/qlogic/Kconfig config QLCNIC_VXLAN · line 71

Quoted 3 lines

bool "QLOGIC QLCNIC 82XX and 83XX family HWMON support"

drivers/net/ethernet/qlogic/Kconfig +1 -1
-       depends on QLCNIC && HWMON
+       depends on QLCNIC && HWMON && !(QLCNIC=y && HWMON=m)

Indeed this is much better and is consistent with what other driver Kconfig entries use.

Can someone formally submit this without the email client patch corruption and proper signoffs?

Thanks!