Skip to contentSkip to conversation

cxgb4: fix thermal zone build error

PATCH Applied Ganesh Goudar 3 participants 3 messages Nov 15, 2018 – Nov 16, 2018

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

PATCH v2 1/1 cxgb4: fix thermal zone build error

with CONFIG_THERMAL=m and cxgb4 as built-in build fails, and 'commit e70a57fa59bb ("cxgb4: fix thermal configuration dependencies")' tries to fix it but when cxgb4i is made built-in build fails again, use IS_REACHABLE instead of IS_ENABLED to fix the issue.

Fixes e70a57fa59bb (cxgb4: fix thermal configuration dependencies)

---
V2: Fixing spelling mistake and avoid preprocessor conditionals.

---
 drivers/net/ethernet/chelsio/Kconfig            | 1 -
 drivers/net/ethernet/chelsio/cxgb4/Makefile     | 4 +---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)
drivers/net/ethernet/chelsio/Kconfig +0 -1
index 75c1c5e..e2cdfa7 100644
@@ -67,7 +67,6 @@ config CHELSIO_T3
 config CHELSIO_T4
 	tristate "Chelsio Communications T4/T5/T6 Ethernet support"
 	depends on PCI && (IPV6 || IPV6=n)
-	depends on THERMAL || !THERMAL
 	select FW_LOADER
 	select MDIO
 	select ZLIB_DEFLATE
drivers/net/ethernet/chelsio/cxgb4/Makefile +1 -3
index 78e5d17..91d8a88 100644
@@ -12,6 +12,4 @@ cxgb4-objs := cxgb4_main.o l2t.o smt.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o
 cxgb4-$(CONFIG_CHELSIO_T4_DCB) +=  cxgb4_dcb.o
 cxgb4-$(CONFIG_CHELSIO_T4_FCOE) +=  cxgb4_fcoe.o
 cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o
-ifdef CONFIG_THERMAL
-cxgb4-objs += cxgb4_thermal.o
-endif
+cxgb4-$(CONFIG_THERMAL) += cxgb4_thermal.o
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +2 -2
index 05a4692..d49db46 100644
@@ -5863,7 +5863,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (!is_t4(adapter->params.chip))
 		cxgb4_ptp_init(adapter);
 
-	if (IS_ENABLED(CONFIG_THERMAL) &&
+	if (IS_REACHABLE(CONFIG_THERMAL) &&
 	    !is_t4(adapter->params.chip) && (adapter->flags & FW_OK))
 		cxgb4_thermal_init(adapter);
 
@@ -5932,7 +5932,7 @@ static void remove_one(struct pci_dev *pdev)
 
 		if (!is_t4(adapter->params.chip))
 			cxgb4_ptp_stop(adapter);
-		if (IS_ENABLED(CONFIG_THERMAL))
+		if (IS_REACHABLE(CONFIG_THERMAL))
 			cxgb4_thermal_remove(adapter);
 
 		/* If we allocated filters, free up state associated with any
Signature · 1 line
2.1.0
maintainer Applied
#1 lore raw

From: Ganesh Goudar <[email protected]>
Date: Thu, 15 Nov 2018 15:36:21 +0530

Quoted 10 lines

with CONFIG_THERMAL=m and cxgb4 as built-in build fails, and 'commit e70a57fa59bb ("cxgb4: fix thermal configuration dependencies")' tries to fix it but when cxgb4i is made built-in build fails again, use IS_REACHABLE instead of IS_ENABLED to fix the issue.

Fixes e70a57fa59bb (cxgb4: fix thermal configuration dependencies)

---
V2: Fixing spelling mistake and avoid preprocessor conditionals.

Applied.

Acked-by on v2 1/1
#2 lore raw
In reply to Ganesh Goudar
Quoted 8 lines · Ganesh Goudar

with CONFIG_THERMAL=m and cxgb4 as built-in build fails, and 'commit e70a57fa59bb ("cxgb4: fix thermal configuration dependencies")' tries to fix it but when cxgb4i is made built-in build fails again, use IS_REACHABLE instead of IS_ENABLED to fix the issue.

Fixes e70a57fa59bb (cxgb4: fix thermal configuration dependencies)

Thanks.

Quoted 55 lines

---
V2: Fixing spelling mistake and avoid preprocessor conditionals.

---
 drivers/net/ethernet/chelsio/Kconfig            | 1 -
 drivers/net/ethernet/chelsio/cxgb4/Makefile     | 4 +---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)
drivers/net/ethernet/chelsio/Kconfig +0 -1
index 75c1c5e..e2cdfa7 100644
@@ -67,7 +67,6 @@ config CHELSIO_T3
 config CHELSIO_T4
 	tristate "Chelsio Communications T4/T5/T6 Ethernet support"
 	depends on PCI && (IPV6 || IPV6=n)
-	depends on THERMAL || !THERMAL
 	select FW_LOADER
 	select MDIO
 	select ZLIB_DEFLATE
drivers/net/ethernet/chelsio/cxgb4/Makefile +1 -3
index 78e5d17..91d8a88 100644
@@ -12,6 +12,4 @@ cxgb4-objs := cxgb4_main.o l2t.o smt.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o
 cxgb4-$(CONFIG_CHELSIO_T4_DCB) +=  cxgb4_dcb.o
 cxgb4-$(CONFIG_CHELSIO_T4_FCOE) +=  cxgb4_fcoe.o
 cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o
-ifdef CONFIG_THERMAL
-cxgb4-objs += cxgb4_thermal.o
-endif
+cxgb4-$(CONFIG_THERMAL) += cxgb4_thermal.o
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +2 -2
index 05a4692..d49db46 100644
@@ -5863,7 +5863,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (!is_t4(adapter->params.chip))
 		cxgb4_ptp_init(adapter);
 
-	if (IS_ENABLED(CONFIG_THERMAL) &&
+	if (IS_REACHABLE(CONFIG_THERMAL) &&
 	    !is_t4(adapter->params.chip) && (adapter->flags & FW_OK))
 		cxgb4_thermal_init(adapter);
 
@@ -5932,7 +5932,7 @@ static void remove_one(struct pci_dev *pdev)
 
 		if (!is_t4(adapter->params.chip))
 			cxgb4_ptp_stop(adapter);
-		if (IS_ENABLED(CONFIG_THERMAL))
+		if (IS_REACHABLE(CONFIG_THERMAL))
 			cxgb4_thermal_remove(adapter);
 
 		/* If we allocated filters, free up state associated with any
Signature · 1 line
~Randy