automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Junfeng Guo <junfeng.guo@intel.com>
Subject: |WARNING| pw110790 [RFC 2/9] net/idpf/base: add OS specific implementation
Date: Sat,  7 May 2022 09:11:15 +0200 (CEST)	[thread overview]
Message-ID: <20220507071115.F3ED51242E3@dpdk.org> (raw)
In-Reply-To: <20220507070726.3263649-3-junfeng.guo@intel.com>

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

_coding style issues_


WARNING:TYPO_SPELLING: 'definations' may be misspelled - perhaps 'definitions'?
#67: 
Add some MACRO definations and small functions which are specific

WARNING:ARRAY_SIZE: Prefer ARRAY_SIZE(arr)
#182: FILE: drivers/net/idpf/base/iecm_osdep.h:100:
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'h' - possible side-effects?
#190: FILE: drivers/net/idpf/base/iecm_osdep.h:108:
+#define iecm_debug(h, m, s, ...)					\
+	do {								\
+		if (((m) & (h)->debug_mask))				\
+			PMD_DRV_LOG_RAW(DEBUG, "iecm %02x.%x " s,       \
+					(h)->bus.device, (h)->bus.func,	\
+					##__VA_ARGS__);			\
+	} while (0)

CHECK:CAMELCASE: Avoid CamelCase: <PRIx64>
#208: FILE: drivers/net/idpf/base/iecm_osdep.h:126:
+				   "0x%04X  0x%016"PRIx64"
",		\

CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements
#208: FILE: drivers/net/idpf/base/iecm_osdep.h:126:
+				   "0x%04X  0x%016"PRIx64"
",		\

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'c' - possible side-effects?
#274: FILE: drivers/net/idpf/base/iecm_osdep.h:192:
+#define iecm_memdup(a, b, c, d)	rte_memcpy(iecm_malloc(a, c), b, c)

CHECK:CAMELCASE: Avoid CamelCase: <PRIu64>
#331: FILE: drivers/net/idpf/base/iecm_osdep.h:249:
+	snprintf(z_name, sizeof(z_name), "iecm_dma_%"PRIu64, rte_rand());

CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements
#331: FILE: drivers/net/idpf/base/iecm_osdep.h:249:
+	snprintf(z_name, sizeof(z_name), "iecm_dma_%"PRIu64, rte_rand());

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'd' - possible side-effects?
#384: FILE: drivers/net/idpf/base/iecm_osdep.h:302:
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#397: FILE: drivers/net/idpf/base/iecm_osdep.h:315:
+#define DIVIDE_AND_ROUND_UP(a, b) (((a) + (b) - 1) / (b))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'addr' - possible side-effects?
#421: FILE: drivers/net/idpf/base/iecm_osdep.h:339:
+#define IS_ZERO_ETHER_ADDR(addr)				\
+	(((bool)((((u16 *)(addr))[0] == ((u16)0x0)))) &&	\
+	 ((bool)((((u16 *)(addr))[1] == ((u16)0x0)))) &&	\
+	 ((bool)((((u16 *)(addr))[2] == ((u16)0x0)))))

total: 0 errors, 2 warnings, 9 checks, 365 lines checked
Warning in drivers/net/idpf/base/iecm_osdep.h:
Using compiler attribute directly

           reply	other threads:[~2022-05-07  7:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20220507070726.3263649-3-junfeng.guo@intel.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220507071115.F3ED51242E3@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=test-report@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).