automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Jasvinder Singh <jasvinder.singh@intel.com>
Subject: [dpdk-test-report] |WARNING| pw41208 [v2] [PATCH 14/22] net/softnic: add cli to create softnic objects
Date: Fri, 15 Jun 2018 18:54:38 +0200 (CEST)	[thread overview]
Message-ID: <20180615165438.08ADE1C0C7@dpdk.org> (raw)
In-Reply-To: <20180615165224.25004-15-jasvinder.singh@intel.com>

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

_coding style issues_


CHECK:BRACES: braces {} should be used on all arms of this statement
#118: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:124:
+	if (strcmp(tokens[2], "dev") == 0)
[...]
+	else if (strcmp(tokens[2], "port") == 0) {
[...]
+	} else {
[...]

WARNING:LONG_LINE_COMMENT: line over 90 characters
#207: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:213:
+ *  [filter match | mismatch offset <key_offset> mask <key_mask> key <key_value> port <port_id>]

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#248: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:254:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "filter") == 0)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#256: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:262:
+		if (strcmp(tokens[t0 + 1], "match") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "mismatch") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#260: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:266:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'size != RTE_PORT_IN_ACTION_FLTR_KEY_SIZE'
#282: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:288:
+		if ((softnic_parse_hex_string(tokens[t0 + 5],
+			p.fltr.key_mask, &size) != 0) ||
+			(size != RTE_PORT_IN_ACTION_FLTR_KEY_SIZE)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'size != RTE_PORT_IN_ACTION_FLTR_KEY_SIZE'
#295: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:301:
+		if ((softnic_parse_hex_string(tokens[t0 + 7],
+			p.fltr.key, &size) != 0) ||
+			(size != RTE_PORT_IN_ACTION_FLTR_KEY_SIZE)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#317: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:323:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "balance") == 0)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#426: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:432:
+	if (strcmp(tokens[4], "ipv4") == 0)
[...]
+	else if (strcmp(tokens[4], "ipv6") == 0)
[...]
+	else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#430: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:436:
+	else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#454: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:460:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "balance") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#498: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:504:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "meter") == 0)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#505: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:511:
+		if (strcmp(tokens[t0 + 1], "srtcm") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "trtcm") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#509: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:515:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#553: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:559:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "tm") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#588: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:594:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "encap") == 0)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#595: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:601:
+		if (strcmp(tokens[t0 + 1], "ether") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "vlan") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "qinq") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "mpls") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "pppoe") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#605: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:611:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#614: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:620:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "nat") == 0)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#621: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:627:
+		if (strcmp(tokens[t0 + 1], "src") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "dst") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#625: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:631:
+		else {

CHECK:BRACES: braces {} should be used on all arms of this statement
#636: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:642:
+		if (strcmp(tokens[t0 + 3], "tcp") == 0)
[...]
+		else if (strcmp(tokens[t0 + 3], "udp") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#640: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:646:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#650: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:656:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "ttl") == 0)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#657: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:663:
+		if (strcmp(tokens[t0 + 1], "drop") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "fwd") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#661: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:667:
+		else {

CHECK:BRACES: braces {} should be used on all arms of this statement
#672: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:678:
+		if (strcmp(tokens[t0 + 3], "none") == 0)
[...]
+		else if (strcmp(tokens[t0 + 3], "pkts") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#676: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:682:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#686: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:692:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "stats") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 't0 < n_tokens'
#712: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:718:
+	if ((t0 < n_tokens) && (strcmp(tokens[t0], "time") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens > t0'
#959: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:965:
+	if ((n_tokens > t0) && (strcmp(tokens[t0], "action") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens > t0'
#971: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:977:
+	if ((n_tokens > t0) &&
+		(strcmp(tokens[t0], "disabled") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens != 7'
#1094: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1100:
+		if ((n_tokens != 7) && (n_tokens != 11)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens != 11'
#1094: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1100:
+		if ((n_tokens != 7) && (n_tokens != 11)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#1203: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1209:
+		if (strcmp(tokens[t0 + 1], "ipv4") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "ipv6") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#1207: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1213:
+		else {

CHECK:BRACES: braces {} should be used on all arms of this statement
#1280: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1286:
+		if (strcmp(tokens[t0 + 1], "ext") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "lru") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#1284: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1290:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'p.match.hash.key_size == 0'
#1295: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1301:
+		if ((softnic_parser_read_uint32(&p.match.hash.key_size,
+			tokens[t0 + 3]) != 0) ||
+			(p.match.hash.key_size == 0) ||
+			(p.match.hash.key_size > TABLE_RULE_MATCH_SIZE_MAX)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'p.match.hash.key_size > TABLE_RULE_MATCH_SIZE_MAX'
#1295: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1301:
+		if ((softnic_parser_read_uint32(&p.match.hash.key_size,
+			tokens[t0 + 3]) != 0) ||
+			(p.match.hash.key_size == 0) ||
+			(p.match.hash.key_size > TABLE_RULE_MATCH_SIZE_MAX)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'key_mask_size != p.match.hash.key_size'
#1308: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1314:
+		if ((softnic_parse_hex_string(tokens[t0 + 5],
+			key_mask, &key_mask_size) != 0) ||
+			(key_mask_size != p.match.hash.key_size)) {

CHECK:BRACES: braces {} should be used on all arms of this statement
#1359: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1365:
+		if (strcmp(tokens[t0 + 1], "ipv4") == 0)
[...]
+		else if (strcmp(tokens[t0 + 1], "ipv6") == 0)
[...]
+		else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#1363: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1369:
+		else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens > t0'
#1402: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1408:
+	if ((n_tokens > t0) && (strcmp(tokens[t0], "action") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 3'
#1625: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1634:
+		if ((n_tokens >= 3) &&
+			(strcmp(tokens[2], "period") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 5'
#1631: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1640:
+		if ((n_tokens >= 5) &&
+			(strcmp(tokens[2], "port") == 0) &&
+			(strcmp(tokens[3], "in") == 0) &&
+			(strcmp(tokens[4], "bsz") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 5'
#1639: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1648:
+		if ((n_tokens >= 5) &&
+			(strcmp(tokens[2], "port") == 0) &&
+			(strcmp(tokens[3], "out") == 0) &&
+			(strcmp(tokens[4], "bsz") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 4'
#1647: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1656:
+		if ((n_tokens >= 4) &&
+			(strcmp(tokens[2], "table") == 0) &&
+			(strcmp(tokens[3], "match") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 6'
#1654: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1663:
+		if ((n_tokens >= 6) &&
+			(strcmp(tokens[2], "port") == 0) &&
+			(strcmp(tokens[3], "in") == 0) &&
+			(strcmp(tokens[5], "table") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 6'
#1663: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1672:
+		if ((n_tokens >= 6) &&
+			(strcmp(tokens[2], "port") == 0) &&
+			(strcmp(tokens[3], "in") == 0) &&
+			(strcmp(tokens[5], "enable") == 0)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens >= 6'
#1672: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1681:
+		if ((n_tokens >= 6) &&
+			(strcmp(tokens[2], "port") == 0) &&
+			(strcmp(tokens[3], "in") == 0) &&
+			(strcmp(tokens[5], "disable") == 0)) {

CHECK:SPACING: No space is necessary after a cast
#1839: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:209:
+		status = rte_ring_sc_dequeue(msgq_rsp, (void **) &rsp);

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'p == NULL'
#1860: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:230:
+	if ((p == NULL) ||
+		(p->enabled == 0) ||
+		(port_id >= p->n_ports_in))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'p->enabled == 0'
#1860: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:230:
+	if ((p == NULL) ||
+		(p->enabled == 0) ||
+		(port_id >= p->n_ports_in))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'port_id >= p->n_ports_in'
#1860: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:230:
+	if ((p == NULL) ||
+		(p->enabled == 0) ||
+		(port_id >= p->n_ports_in))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'p == NULL'
#1903: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:273:
+	if ((p == NULL) ||
+		(p->enabled == 0) ||
+		(port_id >= p->n_ports_in))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'p->enabled == 0'
#1903: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:273:
+	if ((p == NULL) ||
+		(p->enabled == 0) ||
+		(port_id >= p->n_ports_in))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'port_id >= p->n_ports_in'
#1903: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:273:
+	if ((p == NULL) ||
+		(p->enabled == 0) ||
+		(port_id >= p->n_ports_in))

CHECK:SPACING: No space is necessary after a cast
#1943: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:332:
+	struct pipeline_msg_rsp *rsp = (struct pipeline_msg_rsp *) req;

CHECK:SPACING: No space is necessary after a cast
#1956: FILE: drivers/net/softnic/rte_eth_softnic_thread.c:345:
+	struct pipeline_msg_rsp *rsp = (struct pipeline_msg_rsp *) req;

total: 0 errors, 1 warnings, 59 checks, 1938 lines checked

           reply	other threads:[~2018-06-15 16:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20180615165224.25004-15-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=20180615165438.08ADE1C0C7@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).