net: vxge: fix wrong __VA_ARGS__ usage
[ Upstream commit b317538c47943f9903860d83cc0060409e12d2ff ] printk in macro vxge_debug_ll uses __VA_ARGS__ without "##" prefix, it causes a build error when there is no variable arguments(e.g. only fmt is specified.). Signed-off-by: Zheng Wei <wei.zheng@vivo.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f615ab435e
commit
565fcc4469
2 changed files with 8 additions and 8 deletions
|
@ -2065,7 +2065,7 @@ vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask);
|
|||
if ((level >= VXGE_ERR && VXGE_COMPONENT_LL & VXGE_DEBUG_ERR_MASK) || \
|
||||
(level >= VXGE_TRACE && VXGE_COMPONENT_LL & VXGE_DEBUG_TRACE_MASK))\
|
||||
if ((mask & VXGE_DEBUG_MASK) == mask) \
|
||||
printk(fmt "\n", __VA_ARGS__); \
|
||||
printk(fmt "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define vxge_debug_ll(level, mask, fmt, ...)
|
||||
|
|
|
@ -452,49 +452,49 @@ int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override);
|
|||
|
||||
#if (VXGE_DEBUG_LL_CONFIG & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_ll_config(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_ll_config(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_INIT & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_init(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_init(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_TX & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_tx(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_tx(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_RX & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_rx(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_rx(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_MEM & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_mem(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_mem(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_ENTRYEXIT & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_entryexit(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_entryexit(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_INTR & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_intr(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_intr(level, fmt, ...)
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue