automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw68499 [PATCH v4 12/34] net/bnxt: add EM/EEM functionality
       [not found] <1586938751-32808-13-git-send-email-venkatkumar.duvvuru@broadcom.com>
@ 2020-04-15  8:24 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2020-04-15  8:24 UTC (permalink / raw)
  To: test-report; +Cc: Venkat Duvvuru

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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#146: FILE: drivers/net/bnxt/tf_core/lookup3.h:16:
+#define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k))))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'k' - possible side-effects?
#146: FILE: drivers/net/bnxt/tf_core/lookup3.h:16:
+#define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k))))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects?
#189: FILE: drivers/net/bnxt/tf_core/lookup3.h:59:
+#define mix(a, b, c) \
+{ \
+	(a) -= (c); (a) ^= rot((c), 4);  (c) += b; \
+	(b) -= (a); (b) ^= rot((a), 6);  (a) += c; \
+	(c) -= (b); (c) ^= rot((b), 8);  (b) += a; \
+	(a) -= (c); (a) ^= rot((c), 16); (c) += b; \
+	(b) -= (a); (b) ^= rot((a), 19); (a) += c; \
+	(c) -= (b); (c) ^= rot((b), 4);  (b) += a; \
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#189: FILE: drivers/net/bnxt/tf_core/lookup3.h:59:
+#define mix(a, b, c) \
+{ \
+	(a) -= (c); (a) ^= rot((c), 4);  (c) += b; \
+	(b) -= (a); (b) ^= rot((a), 6);  (a) += c; \
+	(c) -= (b); (c) ^= rot((b), 8);  (b) += a; \
+	(a) -= (c); (a) ^= rot((c), 16); (c) += b; \
+	(b) -= (a); (b) ^= rot((a), 19); (a) += c; \
+	(c) -= (b); (c) ^= rot((b), 4);  (b) += a; \
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'c' - possible side-effects?
#189: FILE: drivers/net/bnxt/tf_core/lookup3.h:59:
+#define mix(a, b, c) \
+{ \
+	(a) -= (c); (a) ^= rot((c), 4);  (c) += b; \
+	(b) -= (a); (b) ^= rot((a), 6);  (a) += c; \
+	(c) -= (b); (c) ^= rot((b), 8);  (b) += a; \
+	(a) -= (c); (a) ^= rot((c), 16); (c) += b; \
+	(b) -= (a); (b) ^= rot((a), 19); (a) += c; \
+	(c) -= (b); (c) ^= rot((b), 4);  (b) += a; \
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects?
#223: FILE: drivers/net/bnxt/tf_core/lookup3.h:93:
+#define final(a, b, c) \
+{ \
+	(c) ^= (b); (c) -= rot((b), 14); \
+	(a) ^= (c); (a) -= rot((c), 11); \
+	(b) ^= (a); (b) -= rot((a), 25); \
+	(c) ^= (b); (c) -= rot((b), 16); \
+	(a) ^= (c); (a) -= rot((c), 4);  \
+	(b) ^= (a); (b) -= rot((a), 14); \
+	(c) ^= (b); (c) -= rot((b), 24); \
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#223: FILE: drivers/net/bnxt/tf_core/lookup3.h:93:
+#define final(a, b, c) \
+{ \
+	(c) ^= (b); (c) -= rot((b), 14); \
+	(a) ^= (c); (a) -= rot((c), 11); \
+	(b) ^= (a); (b) -= rot((a), 25); \
+	(c) ^= (b); (c) -= rot((b), 16); \
+	(a) ^= (c); (a) -= rot((c), 4);  \
+	(b) ^= (a); (b) -= rot((a), 14); \
+	(c) ^= (b); (c) -= rot((b), 24); \
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'c' - possible side-effects?
#223: FILE: drivers/net/bnxt/tf_core/lookup3.h:93:
+#define final(a, b, c) \
+{ \
+	(c) ^= (b); (c) -= rot((b), 14); \
+	(a) ^= (c); (a) -= rot((c), 11); \
+	(b) ^= (a); (b) -= rot((a), 25); \
+	(c) ^= (b); (c) -= rot((b), 16); \
+	(a) ^= (c); (a) -= rot((c), 4);  \
+	(b) ^= (a); (b) -= rot((a), 14); \
+	(c) ^= (b); (c) -= rot((b), 24); \
+}

WARNING:MISSING_BREAK: Possible switch case/default not preceded by break or fallthrough comment
#284: FILE: drivers/net/bnxt/tf_core/lookup3.h:154:
+	case 0:	    /* case 0: nothing left to add */

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'crc' - possible side-effects?
#1184: FILE: drivers/net/bnxt/tf_core/tf_em.c:40:
+#define ucrc32(ch, crc) (crc32tbl[((crc) ^ (ch)) & 0xff] ^ ((crc) >> 8))

WARNING:LONG_LINE: line over 90 characters
#1531: FILE: drivers/net/bnxt/tf_core/tf_em.c:387:
+	mask = tf_em_get_key_mask(tbl_scope_cb->em_ctx_info[parms->dir].em_tables[KEY0_TABLE].num_entries);

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'flow_handle' - possible side-effects?
#1817: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:29:
+#define TF_GET_FIELDS_FROM_FLOW_HANDLE(flow_handle,			\
+				       num_key_entries,			\
+				       flow_type,			\
+				       flags,				\
+				       index,				\
+				       entry_num,			\
+				       hash_type)			\
+do {									\
+	(num_key_entries) = \
+		(((flow_handle) & TF_NUM_KEY_ENTRIES_FLOW_HANDLE_MASK) >> \
+		 TF_NUM_KEY_ENTRIES_FLOW_HANDLE_SFT);			\
+	(flow_type) = (((flow_handle) & TF_FLOW_TYPE_FLOW_HANDLE_MASK) >> \
+		     TF_FLOW_TYPE_FLOW_HANDLE_SFT);			\
+	(flags) = (((flow_handle) & TF_FLAGS_FLOW_HANDLE_MASK) >>	\
+		     TF_FLAGS_FLOW_HANDLE_SFT);				\
+	(index) = (((flow_handle) & TF_INDEX_FLOW_HANDLE_MASK) >>	\
+		     TF_INDEX_FLOW_HANDLE_SFT);				\
+	(entry_num) = (((flow_handle) & TF_ENTRY_NUM_FLOW_HANDLE_MASK) >> \
+		     TF_ENTRY_NUM_FLOW_HANDLE_SFT);			\
+	(hash_type) = (((flow_handle) & TF_HASH_TYPE_FLOW_HANDLE_MASK) >> \
+		     TF_HASH_TYPE_FLOW_HANDLE_SFT);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'flow_handle' - possible side-effects?
#1840: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:52:
+#define TF_SET_FIELDS_IN_FLOW_HANDLE(flow_handle,			\
+				     num_key_entries,			\
+				     flow_type,				\
+				     flags,				\
+				     index,				\
+				     entry_num,				\
+				     hash_type)				\
+do {									\
+	(flow_handle) &= ~TF_FLOW_HANDLE_MASK;				\
+	(flow_handle) |= \
+		(((num_key_entries) << TF_NUM_KEY_ENTRIES_FLOW_HANDLE_SFT) & \
+		 TF_NUM_KEY_ENTRIES_FLOW_HANDLE_MASK);			\
+	(flow_handle) |= (((flow_type) << TF_FLOW_TYPE_FLOW_HANDLE_SFT) & \
+			TF_FLOW_TYPE_FLOW_HANDLE_MASK);			\
+	(flow_handle) |= (((flags) << TF_FLAGS_FLOW_HANDLE_SFT) &	\
+			TF_FLAGS_FLOW_HANDLE_MASK);			\
+	(flow_handle) |= ((((uint64_t)index) << TF_INDEX_FLOW_HANDLE_SFT) & \
+			TF_INDEX_FLOW_HANDLE_MASK);			\
+	(flow_handle) |=						\
+		((((uint64_t)entry_num) << TF_ENTRY_NUM_FLOW_HANDLE_SFT) & \
+		 TF_ENTRY_NUM_FLOW_HANDLE_MASK);			\
+	(flow_handle) |=						\
+		((((uint64_t)hash_type) << TF_HASH_TYPE_FLOW_HANDLE_SFT) & \
+		 TF_HASH_TYPE_FLOW_HANDLE_MASK);			\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1867: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:79:
+#define TF_GET_INDEX_FROM_FLOW_HANDLE(flow_handle,			\
+				      index)				\
+do {									\
+	index = (((flow_handle) & TF_INDEX_FLOW_HANDLE_MASK) >>		\
+		     TF_INDEX_FLOW_HANDLE_SFT);				\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1874: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:86:
+#define TF_GET_HASH_TYPE_FROM_FLOW_HANDLE(flow_handle,			\
+					  hash_type)			\
+do {									\
+	hash_type = (((flow_handle) & TF_HASH_TYPE_FLOW_HANDLE_MASK) >>	\
+		     TF_HASH_TYPE_FLOW_HANDLE_SFT);			\
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'flow_id' - possible side-effects?
#1891: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:103:
+#define TF_SET_FLOW_ID(flow_id, gfid, flag, dir)			\
+do {									\
+	(flow_id) &= ~(TF_GFID_FLOW_ID_MASK |				\
+		     TF_FLAG_FLOW_ID_MASK |				\
+		     TF_DIR_FLOW_ID_MASK);				\
+	(flow_id) |= (((gfid) << TF_GFID_FLOW_ID_SFT) &			\
+		    TF_GFID_FLOW_ID_MASK) |				\
+		(((flag) << TF_FLAG_FLOW_ID_SFT) &			\
+		 TF_FLAG_FLOW_ID_MASK) |				\
+		(((dir) << TF_DIR_FLOW_ID_SFT) &			\
+		 TF_DIR_FLOW_ID_MASK);					\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1904: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:116:
+#define TF_GET_GFID_FROM_FLOW_ID(flow_id, gfid)				\
+do {									\
+	gfid = (((flow_id) & TF_GFID_FLOW_ID_MASK) >>			\
+		TF_GFID_FLOW_ID_SFT);					\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1910: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:122:
+#define TF_GET_DIR_FROM_FLOW_ID(flow_id, dir)				\
+do {									\
+	dir = (((flow_id) & TF_DIR_FLOW_ID_MASK) >>			\
+		TF_DIR_FLOW_ID_SFT);					\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1916: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:128:
+#define TF_GET_FLAG_FROM_FLOW_ID(flow_id, flag)				\
+do {									\
+	flag = (((flow_id) & TF_FLAG_FLOW_ID_MASK) >>			\
+		TF_FLAG_FLOW_ID_SFT);					\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1933: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:145:
+#define TF_SET_GFID(gfid, index, type)					\
+do {									\
+	gfid = (((index) << TF_HASH_INDEX_GFID_SFT) &			\
+		TF_HASH_INDEX_GFID_MASK) |				\
+		(((type) << TF_HASH_TYPE_GFID_SFT) &			\
+		 TF_HASH_TYPE_GFID_MASK);				\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1941: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:153:
+#define TF_GET_HASH_INDEX_FROM_GFID(gfid, index)			\
+do {									\
+	index = (((gfid) & TF_HASH_INDEX_GFID_MASK) >>			\
+		TF_HASH_INDEX_GFID_SFT);				\
+} while (0)

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#1947: FILE: drivers/net/bnxt/tf_core/tf_ext_flow_handle.h:159:
+#define TF_GET_HASH_TYPE_FROM_GFID(gfid, type)				\
+do {									\
+	type = (((gfid) & TF_HASH_TYPE_GFID_MASK) >>			\
+		TF_HASH_TYPE_GFID_SFT);					\
+} while (0)

CHECK:CAMELCASE: Avoid CamelCase: <PRIu64>
#2233: FILE: drivers/net/bnxt/tf_core/tf_tbl.c:61:
+				    "No map for page %d table %016" PRIu64 "
",

total: 0 errors, 10 warnings, 13 checks, 3919 lines checked

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

only message in thread, other threads:[~2020-04-15  8:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1586938751-32808-13-git-send-email-venkatkumar.duvvuru@broadcom.com>
2020-04-15  8:24 ` [dpdk-test-report] |WARNING| pw68499 [PATCH v4 12/34] net/bnxt: add EM/EEM functionality 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).