* [PATCH net V2] cxgb4: fix thermal zone build error
@ 2018-11-15 10:06 Ganesh Goudar
2018-11-15 17:49 ` David Miller
2018-11-15 18:05 ` Randy Dunlap
0 siblings, 2 replies; 3+ messages in thread
From: Ganesh Goudar @ 2018-11-15 10:06 UTC (permalink / raw)
To: netdev, davem
Cc: nirranjan, indranil, dt, rdunlap, sergei.shtylyov, 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)
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
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(-)
diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig
index 75c1c5e..e2cdfa7 100644
--- a/drivers/net/ethernet/chelsio/Kconfig
+++ b/drivers/net/ethernet/chelsio/Kconfig
@@ -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
diff --git a/drivers/net/ethernet/chelsio/cxgb4/Makefile b/drivers/net/ethernet/chelsio/cxgb4/Makefile
index 78e5d17..91d8a88 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/Makefile
+++ b/drivers/net/ethernet/chelsio/cxgb4/Makefile
@@ -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
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 05a4692..d49db46 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -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
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net V2] cxgb4: fix thermal zone build error
2018-11-15 10:06 [PATCH net V2] cxgb4: fix thermal zone build error Ganesh Goudar
@ 2018-11-15 17:49 ` David Miller
2018-11-15 18:05 ` Randy Dunlap
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-11-15 17:49 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, indranil, dt, rdunlap, sergei.shtylyov
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Thu, 15 Nov 2018 15:36:21 +0530
> 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)
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
> ---
> V2: Fixing spelling mistake and avoid preprocessor conditionals.
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net V2] cxgb4: fix thermal zone build error
2018-11-15 10:06 [PATCH net V2] cxgb4: fix thermal zone build error Ganesh Goudar
2018-11-15 17:49 ` David Miller
@ 2018-11-15 18:05 ` Randy Dunlap
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2018-11-15 18:05 UTC (permalink / raw)
To: Ganesh Goudar, netdev, davem; +Cc: nirranjan, indranil, dt, sergei.shtylyov
On 11/15/18 2:06 AM, Ganesh Goudar wrote:
> 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)
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> 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(-)
>
> diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig
> index 75c1c5e..e2cdfa7 100644
> --- a/drivers/net/ethernet/chelsio/Kconfig
> +++ b/drivers/net/ethernet/chelsio/Kconfig
> @@ -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
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/Makefile b/drivers/net/ethernet/chelsio/cxgb4/Makefile
> index 78e5d17..91d8a88 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/Makefile
> +++ b/drivers/net/ethernet/chelsio/cxgb4/Makefile
> @@ -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
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
> index 05a4692..d49db46 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
> @@ -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
>
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-16 4:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-15 10:06 [PATCH net V2] cxgb4: fix thermal zone build error Ganesh Goudar
2018-11-15 17:49 ` David Miller
2018-11-15 18:05 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox