Skip to content

Commit a1cf9c9

Browse files
chelsiocudbgdavem330
authored andcommitted
cxgb4: enable ZLIB_DEFLATE when building cxgb4
Fixes: drivers/net/ethernet/chelsio/cxgb4/cudbg_zlib.c:39:5: error: redefinition of 'cudbg_compress_buff' int cudbg_compress_buff(struct cudbg_init *pdbg_init, ^~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/chelsio/cxgb4/cudbg_zlib.c:23:0: drivers/net/ethernet/chelsio/cxgb4/cudbg_zlib.h:45:19: note: previous definition of 'cudbg_compress_buff' was here static inline int cudbg_compress_buff(struct cudbg_init *pdbg_init, ^~~~~~~~~~~~~~~~~~~ Fixes: 91c1953 ("cxgb4: use zlib deflate to compress firmware dump") Signed-off-by: Rahul Lakkireddy <[email protected]> Signed-off-by: Ganesh Goudar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9e1a27c commit a1cf9c9

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

drivers/net/ethernet/chelsio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ config CHELSIO_T4
6969
depends on PCI && (IPV6 || IPV6=n)
7070
select FW_LOADER
7171
select MDIO
72+
select ZLIB_DEFLATE
7273
---help---
7374
This driver supports Chelsio T4, T5 & T6 based gigabit, 10Gb Ethernet
7475
adapter and T5/T6 based 40Gb and T6 based 25Gb, 50Gb and 100Gb

drivers/net/ethernet/chelsio/cxgb4/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ obj-$(CONFIG_CHELSIO_T4) += cxgb4.o
88
cxgb4-objs := cxgb4_main.o l2t.o smt.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o \
99
cxgb4_uld.o sched.o cxgb4_filter.o cxgb4_tc_u32.o \
1010
cxgb4_ptp.o cxgb4_tc_flower.o cxgb4_cudbg.o \
11-
cudbg_common.o cudbg_lib.o
11+
cudbg_common.o cudbg_lib.o cudbg_zlib.o
1212
cxgb4-$(CONFIG_CHELSIO_T4_DCB) += cxgb4_dcb.o
1313
cxgb4-$(CONFIG_CHELSIO_T4_FCOE) += cxgb4_fcoe.o
1414
cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o
15-
cxgb4-$(CONFIG_ZLIB_DEFLATE) += cudbg_zlib.o

drivers/net/ethernet/chelsio/cxgb4/cudbg_zlib.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,11 @@ struct cudbg_compress_hdr {
3333

3434
static inline int cudbg_get_workspace_size(void)
3535
{
36-
#ifdef CONFIG_ZLIB_DEFLATE
3736
return zlib_deflate_workspacesize(CUDBG_ZLIB_WIN_BITS,
3837
CUDBG_ZLIB_MEM_LVL);
39-
#else
40-
return 0;
41-
#endif /* CONFIG_ZLIB_DEFLATE */
4238
}
4339

44-
#ifndef CONFIG_ZLIB_DEFLATE
45-
static inline int cudbg_compress_buff(struct cudbg_init *pdbg_init,
46-
struct cudbg_buffer *pin_buff,
47-
struct cudbg_buffer *pout_buff)
48-
{
49-
return 0;
50-
}
51-
#else
5240
int cudbg_compress_buff(struct cudbg_init *pdbg_init,
5341
struct cudbg_buffer *pin_buff,
5442
struct cudbg_buffer *pout_buff);
55-
#endif /* CONFIG_ZLIB_DEFLATE */
5643
#endif /* __CUDBG_ZLIB_H__ */

0 commit comments

Comments
 (0)