[dpdk-test-report] |WARNING| pw29821 [PATCH v5 2/5] net/mlx5: install a socket to exchange a file descriptor

checkpatch at dpdk.org checkpatch at dpdk.org
Fri Oct 6 17:47:44 CEST 2017


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

_coding style issues_


CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cmsg->cmsg_type == SCM_CREDENTIALS'
#432: FILE: drivers/net/mlx5/mlx5_socket.c:175:
+	if ((cmsg->cmsg_type == SCM_CREDENTIALS) &&
+		(cmsg->cmsg_len >= sizeof(*cred))) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cmsg->cmsg_len >= sizeof(*cred)'
#432: FILE: drivers/net/mlx5/mlx5_socket.c:175:
+	if ((cmsg->cmsg_type == SCM_CREDENTIALS) &&
+		(cmsg->cmsg_len >= sizeof(*cred))) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cred == NULL'
#443: FILE: drivers/net/mlx5/mlx5_socket.c:186:
+	if ((cred == NULL) || (cred->uid != getuid()) ||
+	    (cred->gid != getgid())) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cred->uid != getuid()'
#443: FILE: drivers/net/mlx5/mlx5_socket.c:186:
+	if ((cred == NULL) || (cred->uid != getuid()) ||
+	    (cred->gid != getgid())) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cred->gid != getgid()'
#443: FILE: drivers/net/mlx5/mlx5_socket.c:186:
+	if ((cred == NULL) || (cred->uid != getuid()) ||
+	    (cred->gid != getgid())) {

WARNING:USE_NEGATIVE_ERRNO: return of an errno should typically be negative (ie: return -EINVAL)
#581: FILE: drivers/net/mlx5/mlx5_txq.c:204:
+		return EINVAL;

total: 0 errors, 1 warnings, 5 checks, 566 lines checked


More information about the test-report mailing list