[dpdk-test-report] |WARNING| [PATCH 07/32] drivers/common/dpaa2: adding qbman driver

checkpatch at dpdk.org checkpatch at dpdk.org
Sun Dec 4 13:45:06 CET 2016


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

_coding style issues_


WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#311: FILE: drivers/common/dpaa2/qbman/include/compat.h:60:
+ * with certain attributes and types used in those interfaces. */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#381: FILE: drivers/common/dpaa2/qbman/include/compat.h:130:
+#define BUG()	abort()

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#387: FILE: drivers/common/dpaa2/qbman/include/compat.h:136:
+#define BUG_ON(c) \

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#394: FILE: drivers/common/dpaa2/qbman/include/compat.h:143:
+#define might_sleep_if(c)	BUG_ON(c)

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#405: FILE: drivers/common/dpaa2/qbman/include/compat.h:154:
+#define BUG_ON(c) {}

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#513: FILE: drivers/common/dpaa2/qbman/include/compat.h:262:
+	BUG_ON((unsigned long)dest & 0x3);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#514: FILE: drivers/common/dpaa2/qbman/include/compat.h:263:
+	BUG_ON((unsigned long)src & 0x3);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#515: FILE: drivers/common/dpaa2/qbman/include/compat.h:264:
+	BUG_ON(sz & 0x3);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#526: FILE: drivers/common/dpaa2/qbman/include/compat.h:275:
+	BUG_ON((unsigned long)dest & 0x1);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#527: FILE: drivers/common/dpaa2/qbman/include/compat.h:276:
+	BUG_ON((unsigned long)src & 0x1);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#528: FILE: drivers/common/dpaa2/qbman/include/compat.h:277:
+	BUG_ON(sz & 0x1);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#556: FILE: drivers/common/dpaa2/qbman/include/compat.h:305:
+		BUG_ON(__foo);	\

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#559: FILE: drivers/common/dpaa2/qbman/include/compat.h:308:
+		BUG_ON(__foo);	\

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#561: FILE: drivers/common/dpaa2/qbman/include/compat.h:310:
+		BUG_ON(__foo); \

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#566: FILE: drivers/common/dpaa2/qbman/include/compat.h:315:
+		BUG_ON(__foo); \

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#571: FILE: drivers/common/dpaa2/qbman/include/compat.h:320:
+		BUG_ON(__foo); \

WARNING:TYPECAST_INT_CONSTANT: Unnecessary typecast of c90 int constant
#633: FILE: drivers/common/dpaa2/qbman/include/compat.h:382:
+#define BITS_MASK(idx)	((unsigned long)1 << ((idx) & (BITS_PER_ULONG - 1)))

WARNING:MEMORY_BARRIER: memory barrier without comment
#719: FILE: drivers/common/dpaa2/qbman/include/compat.h:468:
+#define smp_mb() dmb(ish)

WARNING:MEMORY_BARRIER: memory barrier without comment
#756: FILE: drivers/common/dpaa2/qbman/include/compat.h:505:
+	smp_mb();

WARNING:MEMORY_BARRIER: memory barrier without comment
#788: FILE: drivers/common/dpaa2/qbman/include/compat.h:537:
+	smp_mb();

WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct qbman_swp *' should also have an identifier name
#1040: FILE: drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h:70:
+const struct qbman_swp_desc *qbman_swp_get_desc(struct qbman_swp *);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1150: FILE: drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h:180:
+ * timeout is set (compared to the timeout that was requested). */

WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct qbman_swp *' should also have an identifier name
#1302: FILE: drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h:332:
+const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *);

WARNING:FUNCTION_ARGUMENTS: function definition argument 'const struct qbman_result *' should also have an identifier name
#1366: FILE: drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h:396:
+int qbman_result_is_DQ(const struct qbman_result *);

WARNING:FUNCTION_ARGUMENTS: function definition argument 'const struct qbman_result *' should also have an identifier name
#1435: FILE: drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h:465:
+int qbman_result_is_FQRN(const struct qbman_result *);

WARNING:FUNCTION_ARGUMENTS: function definition argument 'const struct qbman_result *' should also have an identifier name
#1443: FILE: drivers/common/dpaa2/qbman/include/fsl_qbman_portal.h:473:
+int qbman_result_is_FQRNI(const struct qbman_result *);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2247: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:182:
+	BUG_ON(p->mc.check != swp_mc_can_start);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2315: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:250:
+	BUG_ON(p->mc.check != swp_mc_can_start);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2329: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:264:
+	BUG_ON(!p->mc.check != swp_mc_can_submit);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2334: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:269:
+	 * caller wants to OR but has forgotten to do so. */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2335: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:270:
+	BUG_ON((*v & cmd_verb) != *v);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2347: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:282:
+	BUG_ON(p->mc.check != swp_mc_can_poll);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2646: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:581:
+	BUG_ON(channel_idx > 15);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2655: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:590:
+	BUG_ON(channel_idx > 15);

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#2658: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:593:
+	/* Read make the complete src map.  If no channels are enabled
+	   the SDQCR must be 0 or else QMan will assert errors */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2658: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:593:
+	   the SDQCR must be 0 or else QMan will assert errors */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2698: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:633:
+	 * descriptor (which aren't copied to the hw command) */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2713: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:648:
+	BUG_ON(!numframes || (numframes > 16));

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#2765: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:700:
+	/* We use portal index +1 as token so that 0 still indicates
+	   that the result isn't valid yet. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2765: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:700:
+	   that the result isn't valid yet. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2807: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:742:
+ * requiring they be consumed immediately or in any particular order. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2817: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:752:
+	* handle the case of the DQRR reset bug... */

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#2817: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:752:
+	/* Before using valid-bit to detect if something is there, we have to
+	* handle the case of the DQRR reset bug... */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#2838: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:773:
+		BUG_ON((s->dqrr.dqrr_size - 1) < 0);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2862: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:797:
+	 * entry (and prefetch it) before returning what we found. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#2869: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:804:
+	/* If this is the final response to a volatile dequeue command
+	  indicate that the vdq is no longer busy */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2869: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:804:
+	  indicate that the vdq is no longer busy */

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 24)
#2872: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:807:
+	if ((response_verb == QBMAN_RESULT_DQ) &&
[...]
+			atomic_inc(&s->vdq.busy);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2899: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:834:
+	 * where DQRR_TOK_OFFSET comes in... */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2905: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:840:
+	 * const because it is mutable from our perspective. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#2913: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:848:
+	/* Entry is valid - overwrite token back to 0 so
+	   a) If this memory is reused tokesn will be 0

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2915: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:850:
+	      will not appear to be new */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2920: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:855:
+	 * there's no risk of us converting the endianness twice... */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#2933: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:868:
+	 * where DQRR_TOK_OFFSET comes in... */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3246: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1181:
+	BUG_ON(!num_buffers || (num_buffers > 7));

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3253: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1188:
+	 * of buffers. */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3276: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1211:
+	BUG_ON(!num_buffers || (num_buffers > 7));

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3294: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1229:
+	BUG_ON(qb_attr_code_decode(&code_generic_verb, p) != QBMAN_MC_ACQUIRE);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3302: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1237:
+	BUG_ON(num > num_buffers);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3331: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1266:
+	BUG_ON(qb_attr_code_decode(&code_generic_verb, p) != alt_fq_verb);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3373: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1308:
+ * would be irresponsible to expose it. */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3399: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1334:
+	BUG_ON(qb_attr_code_decode(&code_generic_verb, p)

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3501: FILE: drivers/common/dpaa2/qbman/qbman_portal.c:1436:
+	 * we use a following trick: we record all lines in 32 bit word */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3601: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:54:
+	 * needs in here. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3628: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:81:
+		 * command is executing, "vdq" is no longer "busy". */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3635: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:88:
+		 * dequeue entries in DQRR or main-memory (respectively). */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3663: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:116:
+ * non-NULL if only if the response is complete). */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3785: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:238:
+	BUG_ON(val >= (1u << code->width));

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#3788: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:241:
+	 * from unsigned to signed */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3789: FILE: drivers/common/dpaa2/qbman/qbman_portal.h:242:
+	BUG_ON(code->width > sizeof(val) * CHAR_BIT);

WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#3846: FILE: drivers/common/dpaa2/qbman/qbman_private.h:24:
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3882: FILE: drivers/common/dpaa2/qbman/qbman_private.h:60:
+	do {if (!(loopvar--)) BUG_ON(NULL == "DBG_POLL_CHECK"); } while (0)

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3915: FILE: drivers/common/dpaa2/qbman/qbman_private.h:93:
+	BUG_ON(width > (sizeof(t) * 8)); \

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3920: FILE: drivers/common/dpaa2/qbman/qbman_private.h:98:
+	BUG_ON(width > (sizeof(t) * 8)); \

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3926: FILE: drivers/common/dpaa2/qbman/qbman_private.h:104:
+	BUG_ON(width > (sizeof(t) * 8)); \

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#3932: FILE: drivers/common/dpaa2/qbman/qbman_private.h:110:
+	BUG_ON(width > (sizeof(t) * 8)); \

WARNING:TYPECAST_INT_CONSTANT: Unnecessary typecast of c90 int constant
#3979: FILE: drivers/common/dpaa2/qbman/qbman_private.h:157:
+	unsigned long start = p & ~(unsigned long)15;

WARNING:TYPECAST_INT_CONSTANT: Unnecessary typecast of c90 int constant
#3980: FILE: drivers/common/dpaa2/qbman/qbman_private.h:158:
+	unsigned long end = (p + sz + 15) & ~(unsigned long)15;

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#4033: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:41:
+ * required. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#4051: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:59:
+ * host endianness. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#4062: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:70:
+		 * ways of doing this. */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#4127: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:135:
+	 * place-holder. */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#4172: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:180:
+	BUG_ON(offset & 63);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#4184: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:192:
+	BUG_ON(offset & 63);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#4280: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:288:
+ * qbman_portal.c. So use of it is declared locally here. */

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#4327: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:335:
+	BUG_ON(d->idx < 0);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#4334: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:342:
+	BUG_ON(reg);

WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#4365: FILE: drivers/common/dpaa2/qbman/qbman_sys.h:373:
+	BUG_ON(offset & 63);

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#4410: FILE: drivers/common/dpaa2/qbman/qbman_sys_decl.h:37:
+ * very quickly. It's an exception, and this symbol is used for that case. */

total: 0 errors, 89 warnings, 4214 lines checked


More information about the test-report mailing list