automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw37221 [PATCH v4 02/17] net/axgbe: add register map and related macros
       [not found] <1522910389-35530-2-git-send-email-Ravi1.kumar@amd.com>
@ 2018-04-05  6:41 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2018-04-05  6:41 UTC (permalink / raw)
  To: test-report; +Cc: Ravi Kumar

Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/37221

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse '_var' - possible side-effects?
#1315: FILE: drivers/net/axgbe/axgbe_common.h:1336:
+#define SET_BITS(_var, _index, _width, _val)				\
+do {									\
+	(_var) &= ~(((0x1 << (_width)) - 1) << (_index));		\
+	(_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index));	\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_index' - possible side-effects?
#1315: FILE: drivers/net/axgbe/axgbe_common.h:1336:
+#define SET_BITS(_var, _index, _width, _val)				\
+do {									\
+	(_var) &= ~(((0x1 << (_width)) - 1) << (_index));		\
+	(_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index));	\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_width' - possible side-effects?
#1315: FILE: drivers/net/axgbe/axgbe_common.h:1336:
+#define SET_BITS(_var, _index, _width, _val)				\
+do {									\
+	(_var) &= ~(((0x1 << (_width)) - 1) << (_index));		\
+	(_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index));	\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_var' - possible side-effects?
#1324: FILE: drivers/net/axgbe/axgbe_common.h:1345:
+#define SET_BITS_LE(_var, _index, _width, _val)				\
+do {									\
+	(_var) &= rte_cpu_to_le_32(~(((0x1 << (_width)) - 1) << (_index)));\
+	(_var) |= rte_cpu_to_le_32((((_val) &				\
+			      ((0x1 << (_width)) - 1)) << (_index)));	\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_index' - possible side-effects?
#1324: FILE: drivers/net/axgbe/axgbe_common.h:1345:
+#define SET_BITS_LE(_var, _index, _width, _val)				\
+do {									\
+	(_var) &= rte_cpu_to_le_32(~(((0x1 << (_width)) - 1) << (_index)));\
+	(_var) |= rte_cpu_to_le_32((((_val) &				\
+			      ((0x1 << (_width)) - 1)) << (_index)));	\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_width' - possible side-effects?
#1324: FILE: drivers/net/axgbe/axgbe_common.h:1345:
+#define SET_BITS_LE(_var, _index, _width, _val)				\
+do {									\
+	(_var) &= rte_cpu_to_le_32(~(((0x1 << (_width)) - 1) << (_index)));\
+	(_var) |= rte_cpu_to_le_32((((_val) &				\
+			      ((0x1 << (_width)) - 1)) << (_index)));	\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1377: FILE: drivers/net/axgbe/axgbe_common.h:1398:
+#define AXGMAC_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u32 reg_val = AXGMAC_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_IOWRITE((_pdata), _reg, reg_val);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1377: FILE: drivers/net/axgbe/axgbe_common.h:1398:
+#define AXGMAC_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u32 reg_val = AXGMAC_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_IOWRITE((_pdata), _reg, reg_val);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1403: FILE: drivers/net/axgbe/axgbe_common.h:1424:
+#define AXGMAC_MTL_IOWRITE_BITS(_pdata, _n, _reg, _field, _val)		\
+do {									\
+	u32 reg_val = AXGMAC_MTL_IOREAD((_pdata), (_n), _reg);		\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_MTL_IOWRITE((_pdata), (_n), _reg, reg_val);		\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_n' - possible side-effects?
#1403: FILE: drivers/net/axgbe/axgbe_common.h:1424:
+#define AXGMAC_MTL_IOWRITE_BITS(_pdata, _n, _reg, _field, _val)		\
+do {									\
+	u32 reg_val = AXGMAC_MTL_IOREAD((_pdata), (_n), _reg);		\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_MTL_IOWRITE((_pdata), (_n), _reg, reg_val);		\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1403: FILE: drivers/net/axgbe/axgbe_common.h:1424:
+#define AXGMAC_MTL_IOWRITE_BITS(_pdata, _n, _reg, _field, _val)		\
+do {									\
+	u32 reg_val = AXGMAC_MTL_IOREAD((_pdata), (_n), _reg);		\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_MTL_IOWRITE((_pdata), (_n), _reg, reg_val);		\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_channel' - possible side-effects?
#1427: FILE: drivers/net/axgbe/axgbe_common.h:1448:
+#define AXGMAC_DMA_IOWRITE_BITS(_channel, _reg, _field, _val)		\
+do {									\
+	u32 reg_val = AXGMAC_DMA_IOREAD((_channel), _reg);		\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_DMA_IOWRITE((_channel), _reg, reg_val);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1427: FILE: drivers/net/axgbe/axgbe_common.h:1448:
+#define AXGMAC_DMA_IOWRITE_BITS(_channel, _reg, _field, _val)		\
+do {									\
+	u32 reg_val = AXGMAC_DMA_IOREAD((_channel), _reg);		\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	AXGMAC_DMA_IOWRITE((_channel), _reg, reg_val);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1485: FILE: drivers/net/axgbe/axgbe_common.h:1506:
+#define XSIR0_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u16 reg_val = XSIR0_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XSIR0_IOWRITE((_pdata), _reg, reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1485: FILE: drivers/net/axgbe/axgbe_common.h:1506:
+#define XSIR0_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u16 reg_val = XSIR0_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XSIR0_IOWRITE((_pdata), _reg, reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1505: FILE: drivers/net/axgbe/axgbe_common.h:1526:
+#define XSIR1_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u16 reg_val = XSIR1_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XSIR1_IOWRITE((_pdata), _reg, reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1505: FILE: drivers/net/axgbe/axgbe_common.h:1526:
+#define XSIR1_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u16 reg_val = XSIR1_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XSIR1_IOWRITE((_pdata), _reg, reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1528: FILE: drivers/net/axgbe/axgbe_common.h:1549:
+#define XRXTX_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u16 reg_val = XRXTX_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XRXTX_IOWRITE((_pdata), _reg, reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1528: FILE: drivers/net/axgbe/axgbe_common.h:1549:
+#define XRXTX_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u16 reg_val = XRXTX_IOREAD((_pdata), _reg);			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XRXTX_IOWRITE((_pdata), _reg, reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1561: FILE: drivers/net/axgbe/axgbe_common.h:1582:
+#define XP_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u32 reg_val = XP_IOREAD((_pdata), (_reg));			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XP_IOWRITE((_pdata), (_reg), reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1561: FILE: drivers/net/axgbe/axgbe_common.h:1582:
+#define XP_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u32 reg_val = XP_IOREAD((_pdata), (_reg));			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XP_IOWRITE((_pdata), (_reg), reg_val);				\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1594: FILE: drivers/net/axgbe/axgbe_common.h:1615:
+#define XI2C_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u32 reg_val = XI2C_IOREAD((_pdata), (_reg));			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XI2C_IOWRITE((_pdata), (_reg), reg_val);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1594: FILE: drivers/net/axgbe/axgbe_common.h:1615:
+#define XI2C_IOWRITE_BITS(_pdata, _reg, _field, _val)			\
+do {									\
+	u32 reg_val = XI2C_IOREAD((_pdata), (_reg));			\
+	SET_BITS(reg_val,						\
+		 _reg##_##_field##_INDEX,				\
+		 _reg##_##_field##_WIDTH, (_val));			\
+	XI2C_IOWRITE((_pdata), (_reg), reg_val);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1608: FILE: drivers/net/axgbe/axgbe_common.h:1629:
+#define XMDIO_READ(_pdata, _mmd, _reg)					\
+	((_pdata)->hw_if.read_mmd_regs((_pdata), 0,			\
+		MII_ADDR_C45 | ((_mmd) << 16) | ((_reg) & 0xffff)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1615: FILE: drivers/net/axgbe/axgbe_common.h:1636:
+#define XMDIO_WRITE(_pdata, _mmd, _reg, _val)				\
+	((_pdata)->hw_if.write_mmd_regs((_pdata), 0,			\
+		MII_ADDR_C45 | ((_mmd) << 16) | ((_reg) & 0xffff), (_val)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_pdata' - possible side-effects?
#1619: FILE: drivers/net/axgbe/axgbe_common.h:1640:
+#define XMDIO_WRITE_BITS(_pdata, _mmd, _reg, _mask, _val)		\
+do {									\
+	u32 mmd_val = XMDIO_READ((_pdata), (_mmd), (_reg));		\
+	mmd_val &= ~(_mask);						\
+	mmd_val |= (_val);						\
+	XMDIO_WRITE((_pdata), (_mmd), (_reg), (mmd_val));		\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_mmd' - possible side-effects?
#1619: FILE: drivers/net/axgbe/axgbe_common.h:1640:
+#define XMDIO_WRITE_BITS(_pdata, _mmd, _reg, _mask, _val)		\
+do {									\
+	u32 mmd_val = XMDIO_READ((_pdata), (_mmd), (_reg));		\
+	mmd_val &= ~(_mask);						\
+	mmd_val |= (_val);						\
+	XMDIO_WRITE((_pdata), (_mmd), (_reg), (mmd_val));		\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_reg' - possible side-effects?
#1619: FILE: drivers/net/axgbe/axgbe_common.h:1640:
+#define XMDIO_WRITE_BITS(_pdata, _mmd, _reg, _mask, _val)		\
+do {									\
+	u32 mmd_val = XMDIO_READ((_pdata), (_mmd), (_reg));		\
+	mmd_val &= ~(_mask);						\
+	mmd_val |= (_val);						\
+	XMDIO_WRITE((_pdata), (_mmd), (_reg), (mmd_val));		\
+} while (0)

total: 0 errors, 0 warnings, 28 checks, 1648 lines checked

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-05  6:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1522910389-35530-2-git-send-email-Ravi1.kumar@amd.com>
2018-04-05  6:41 ` [dpdk-test-report] |WARNING| pw37221 [PATCH v4 02/17] net/axgbe: add register map and related macros checkpatch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).