From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Jasvinder Singh <jasvinder.singh@intel.com>
Subject: [dpdk-test-report] |WARNING| pw40838 [PATCH 12/21] net/softnic: add cli interface
Date: Fri, 8 Jun 2018 16:19:20 +0200 (CEST) [thread overview]
Message-ID: <20180608141920.202B61BB43@dpdk.org> (raw)
In-Reply-To: <20180608124155.140663-13-jasvinder.singh@intel.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/40838
_coding style issues_
WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#50: FILE: drivers/net/softnic/parser.c:1:
+/* SPDX-License-Identifier: BSD-3-Clause
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'string == NULL'
#306: FILE: drivers/net/softnic/parser.c:257:
+ if ((string == NULL) ||
+ (tokens == NULL) ||
+ (*n_tokens < 1))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tokens == NULL'
#306: FILE: drivers/net/softnic/parser.c:257:
+ if ((string == NULL) ||
+ (tokens == NULL) ||
+ (*n_tokens < 1))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'i == *n_tokens'
#317: FILE: drivers/net/softnic/parser.c:268:
+ if ((i == *n_tokens) &&
+ (NULL != strtok_r(string, PARSE_DELIMITER, &string)))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'NULL != strtok_r(string, PARSE_DELIMITER, &string)'
#317: FILE: drivers/net/softnic/parser.c:268:
+ if ((i == *n_tokens) &&
+ (NULL != strtok_r(string, PARSE_DELIMITER, &string)))
WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#318: FILE: drivers/net/softnic/parser.c:269:
+ (NULL != strtok_r(string, PARSE_DELIMITER, &string)))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'src == NULL'
#332: FILE: drivers/net/softnic/parser.c:283:
+ if ((src == NULL) ||
+ (dst == NULL) ||
+ (size == NULL) ||
+ (*size == 0))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'dst == NULL'
#332: FILE: drivers/net/softnic/parser.c:283:
+ if ((src == NULL) ||
+ (dst == NULL) ||
+ (size == NULL) ||
+ (*size == 0))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'size == NULL'
#332: FILE: drivers/net/softnic/parser.c:283:
+ if ((src == NULL) ||
+ (dst == NULL) ||
+ (size == NULL) ||
+ (*size == 0))
CHECK:SPACING: No space is necessary after a cast
#392: FILE: drivers/net/softnic/parser.c:343:
+ labels[count++] = (uint32_t) value;
CHECK:BRACES: braces {} should be used on all arms of this statement
#426: FILE: drivers/net/softnic/parser.c:377:
+ if (pch != NULL) {
[...]
+ } else if (ch == '.' && saw_digit) {
[...]
+ } else
[...]
CHECK:BRACES: Unbalanced braces around else statement
#442: FILE: drivers/net/softnic/parser.c:393:
+ } else
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#474: FILE: drivers/net/softnic/parser.c:425:
+ unsigned dbloct_count = 0;
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#484: FILE: drivers/net/softnic/parser.c:435:
+ saw_xdigit = count_xdigit = 0;
CHECK:SPACING: No space is necessary after a cast
#516: FILE: drivers/net/softnic/parser.c:467:
+ *tp++ = (unsigned char) ((val >> 8) & 0xff);
CHECK:SPACING: No space is necessary after a cast
#517: FILE: drivers/net/softnic/parser.c:468:
+ *tp++ = (unsigned char) (val & 0xff);
CHECK:SPACING: No space is necessary after a cast
#536: FILE: drivers/net/softnic/parser.c:487:
+ *tp++ = (unsigned char) ((val >> 8) & 0xff);
CHECK:SPACING: No space is necessary after a cast
#537: FILE: drivers/net/softnic/parser.c:488:
+ *tp++ = (unsigned char) (val & 0xff);
WARNING:ARRAY_SIZE: Prefer ARRAY_SIZE(o)
#579: FILE: drivers/net/softnic/parser.c:530:
+ } while (++i != sizeof(o) / sizeof(o[0]) && end[0] != 0);
CHECK:BRACES: braces {} should be used on all arms of this statement
#586: FILE: drivers/net/softnic/parser.c:537:
+ if (i == ETHER_ADDR_LEN) {
[...]
+ } else if (i == ETHER_ADDR_LEN / 2) {
[...]
+ } else
[...]
CHECK:BRACES: Unbalanced braces around else statement
#601: FILE: drivers/net/softnic/parser.c:552:
+ } else
WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1
#812: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1:
+/* SPDX-License-Identifier: BSD-3-Clause
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'file_name == NULL'
#885: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:74:
+ if ((file_name == NULL) ||
+ (strlen(file_name) == 0) ||
+ (msg_in_len_max == 0) ||
+ (msg_out_len_max == 0))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'msg_in_len_max == 0'
#885: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:74:
+ if ((file_name == NULL) ||
+ (strlen(file_name) == 0) ||
+ (msg_in_len_max == 0) ||
+ (msg_out_len_max == 0))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'msg_out_len_max == 0'
#885: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:74:
+ if ((file_name == NULL) ||
+ (strlen(file_name) == 0) ||
+ (msg_in_len_max == 0) ||
+ (msg_out_len_max == 0))
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'msg_in == NULL'
#893: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:82:
+ if ((msg_in == NULL) ||
+ (msg_out == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'msg_out == NULL'
#893: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:82:
+ if ((msg_in == NULL) ||
+ (msg_out == NULL)) {
total: 0 errors, 5 warnings, 22 checks, 896 lines checked
parent reply other threads:[~2018-06-08 14:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20180608124155.140663-13-jasvinder.singh@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=20180608141920.202B61BB43@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=jasvinder.singh@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).