[dpdk-test-report] |WARNING| pw50452 [v3] lib/metrics: add unregister api for metrics

checkpatch at dpdk.org checkpatch at dpdk.org
Fri Feb 22 16:04:35 CET 2019


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

_coding style issues_


WARNING:BRACES: braces {} are not necessary for single statement blocks
#113: FILE: lib/librte_metrics/rte_metrics.c:79:
+	if (bmp_mem == NULL) {
+		rte_exit(EXIT_FAILURE,"Failed to allocate metrics bitmap
");
+	}

ERROR:SPACING: space required after that ',' (ctx:VxV)
#114: FILE: lib/librte_metrics/rte_metrics.c:80:
+		rte_exit(EXIT_FAILURE,"Failed to allocate metrics bitmap
");
 		                     ^

ERROR:SPACING: space required after that ',' (ctx:VxV)
#120: FILE: lib/librte_metrics/rte_metrics.c:86:
+		rte_exit(EXIT_FAILURE,"Failed to init metrics bitmap
");
 		                     ^

WARNING:BRACES: braces {} are not necessary for single statement blocks
#155: FILE: lib/librte_metrics/rte_metrics.c:134:
+				if (rte_bitmap_get(stats->bits, idx)) {
+					break;
+				}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#159: FILE: lib/librte_metrics/rte_metrics.c:138:
+			if (idx == idx_base + cnt_names) {
+				break;
+			}

ERROR:SPACING: space required after that close brace '}'
#203: FILE: lib/librte_metrics/rte_metrics.c:196:
+		}else

ERROR:SPACING: space prohibited before that close parenthesis ')'
#229: FILE: lib/librte_metrics/rte_metrics.c:232:
+	if (count < 1 )

ERROR:TRAILING_WHITESPACE: trailing whitespace
#235: FILE: lib/librte_metrics/rte_metrics.c:238:
+^I$

WARNING:BRACES: braces {} are not necessary for single statement blocks
#240: FILE: lib/librte_metrics/rte_metrics.c:243:
+	if (key >= RTE_METRICS_MAX_METRICS) {
+		return -EINVAL;
+	}

ERROR:SPACING: space required before the open parenthesis '('
#249: FILE: lib/librte_metrics/rte_metrics.c:252:
+		if(rte_bitmap_get(stats->bits, idx_metric)) {

ERROR:SPACING: space required after that close brace '}'
#252: FILE: lib/librte_metrics/rte_metrics.c:255:
+		}else

ERROR:TRAILING_WHITESPACE: trailing whitespace
#261: FILE: lib/librte_metrics/rte_metrics.c:264:
+^I$

WARNING:SPACING: space prohibited before semicolon
#264: FILE: lib/librte_metrics/rte_metrics.c:267:
+		memset(stats->metadata[idx_metric].name, 0, RTE_METRICS_MAX_NAME_LEN) ;

ERROR:TRAILING_WHITESPACE: trailing whitespace
#293: FILE: lib/librte_metrics/rte_metrics.c:298:
+^I^Ifor (idx_name = 0; idx< stats->cnt_stats && $

ERROR:SPACING: spaces required around that '<' (ctx:VxW)
#293: FILE: lib/librte_metrics/rte_metrics.c:298:
+		for (idx_name = 0; idx< stats->cnt_stats && 
 		                      ^

ERROR:SPACING: space required before the open parenthesis '('
#295: FILE: lib/librte_metrics/rte_metrics.c:300:
+			if(rte_bitmap_get(stats->bits, idx_name)) {

ERROR:SPACING: space required before the open parenthesis '('
#334: FILE: lib/librte_metrics/rte_metrics.c:345:
+			if(rte_bitmap_get(stats->bits, idx_name)) {

ERROR:TRAILING_WHITESPACE: trailing whitespace
#345: FILE: lib/librte_metrics/rte_metrics.c:354:
+^I^I}^I^I$

total: 13 errors, 5 warnings, 325 lines checked


More information about the test-report mailing list