linux_dsm_epyc7002/drivers/net/ethernet/chelsio
Arnd Bergmann e70a57fa59 cxgb4: fix thermal configuration dependencies
With CONFIG_THERMAL=m, we get a build error:

drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 'cxgb4_thermal_get_trip_type':
drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c:48:11: error: 'struct adapter' has no member named 'ch_thermal'

Once that is fixed by using IS_ENABLED() checks, we get a link error
against the thermal subsystem when cxgb4 is built-in:

drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_init':
cxgb4_thermal.c:(.text+0x180): undefined reference to `thermal_zone_device_register'
drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_remove':
cxgb4_thermal.c:(.text+0x1e0): undefined reference to `thermal_zone_device_unregister'

Finally, since CONFIG_THERMAL can be =m, the Makefile fails to pick up the
extra file into built-in.a, and we get another link failure against the
cxgb4_thermal_init/cxgb4_thermal_remove files, so the Makefile has to
be adapted as well to work for both CONFIG_THERMAL=y and =m.

Fixes: b187191577 ("cxgb4: Add thermal zone support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-11 10:21:15 -07:00
..
cxgb net: chelsio: cxgb2: remove unused array pci_speed 2018-08-10 10:24:50 -07:00
cxgb3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-06 14:43:42 -07:00
cxgb4 cxgb4: fix thermal configuration dependencies 2018-10-11 10:21:15 -07:00
cxgb4vf net: chelsio: Use zeroing memory allocator instead of allocator/memset 2018-06-04 16:07:30 -04:00
libcxgb libcxgb: replace vmalloc and memset with vzalloc 2018-07-21 16:32:59 -07:00
Kconfig cxgb4: fix thermal configuration dependencies 2018-10-11 10:21:15 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00