automatic DPDK test reports
 help / color / mirror / Atom feed
* [dpdk-test-report] |WARNING| pw48619 [RFC, v2] /net: memory interface (memif)
       [not found] <20181210100639.30244-1-jgrajcia@cisco.com>
@ 2018-12-10 10:08 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2018-12-10 10:08 UTC (permalink / raw)
  To: test-report; +Cc: Jakub Grajciar

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

_coding style issues_


WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

CHECK:CAMELCASE: Avoid CamelCase: <_Static_assert>
#236: FILE: drivers/net/memif/memif.h:115:
+_Static_assert(sizeof(memif_msg_t) == 128, "Size of memif_msg_t must be 128");

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#255: FILE: drivers/net/memif/memif.h:134:
+  uint8_t mark[0] __attribute__((aligned(MEMIF_CACHELINE_SIZE)))$

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#313: FILE: drivers/net/memif/memif_socket.c:30:
+static inline ssize_t memif_msg_send(int fd, memif_msg_t * msg, int afd)

WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'cc->pmd->vdev'
#356: FILE: drivers/net/memif/memif_socket.c:73:
+			 NULL) ? rte_vdev_device_name(cc->pmd->
+						      vdev) : "memif_driver",

CHECK:SPACING: spaces preferred around that '*' (ctx:ExV)
#367: FILE: drivers/net/memif/memif_socket.c:84:
+							*cc)
 							^

WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'cc->pmd->vdev'
#393: FILE: drivers/net/memif/memif_socket.c:110:
+			 NULL) ? rte_vdev_device_name(cc->pmd->
+						      vdev) : "memif_driver");

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#432: FILE: drivers/net/memif/memif_socket.c:149:
+static int memif_msg_receive_hello(struct pmd_internals *pmd, memif_msg_t * msg)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#460: FILE: drivers/net/memif/memif_socket.c:177:
+memif_msg_receive_init(struct memif_control_channel *cc, memif_msg_t * msg)

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->id == i->id'
#479: FILE: drivers/net/memif/memif_socket.c:196:
+		if (((pmd->flags & ETH_MEMIF_FLAG_DISABLED) == 0)
+		    && (pmd->id == i->id)) {

CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line
#480: FILE: drivers/net/memif/memif_socket.c:197:
+		if (((pmd->flags & ETH_MEMIF_FLAG_DISABLED) == 0)
+		    && (pmd->id == i->id)) {

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#529: FILE: drivers/net/memif/memif_socket.c:246:
+memif_msg_receive_add_region(struct pmd_internals *pmd, memif_msg_t * msg,

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#563: FILE: drivers/net/memif/memif_socket.c:280:
+memif_msg_receive_add_ring(struct pmd_internals *pmd, memif_msg_t * msg, int fd)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#603: FILE: drivers/net/memif/memif_socket.c:320:
+memif_msg_receive_connect(struct pmd_internals *pmd, memif_msg_t * msg)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#621: FILE: drivers/net/memif/memif_socket.c:338:
+memif_msg_receive_connected(struct pmd_internals *pmd, memif_msg_t * msg)

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#639: FILE: drivers/net/memif/memif_socket.c:356:
+memif_msg_receive_disconnect(struct pmd_internals *pmd, memif_msg_t * msg)

WARNING:BRACES: braces {} are not necessary for single statement blocks
#682: FILE: drivers/net/memif/memif_socket.c:399:
+	if (pmd->secret) {
+		strncpy((char *)i->secret, pmd->secret, sizeof(i->secret) - 1);
+	}

WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'pmd->cc'
#816: FILE: drivers/net/memif/memif_socket.c:533:
+				    rte_intr_callback_unregister_pending(&pmd->
+									 cc->

WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'cc->intr_handle'
#817: FILE: drivers/net/memif/memif_socket.c:534:
+									 cc->
+									 intr_handle,

WARNING:LONG_LINE: line over 90 characters
#818: FILE: drivers/net/memif/memif_socket.c:535:
+									 memif_intr_handler,

WARNING:MULTILINE_DEREFERENCE: Avoid multiple line dereference - prefer 'pmd->cc'
#820: FILE: drivers/net/memif/memif_socket.c:537:
+									 pmd->
+									 cc,

WARNING:LONG_LINE: line over 90 characters
#821: FILE: drivers/net/memif/memif_socket.c:538:
+									 memif_intr_unregister_handler);

WARNING:BRACES: braces {} are not necessary for any arm of this statement
#897: FILE: drivers/net/memif/memif_socket.c:614:
+			if (cmsg->cmsg_type == SCM_CREDENTIALS) {
[...]
+			} else if (cmsg->cmsg_type == SCM_RIGHTS) {
[...]

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cc->pmd == NULL'
#906: FILE: drivers/net/memif/memif_socket.c:623:
+	if ((cc->pmd == NULL) && msg.type != MEMIF_MSG_TYPE_INIT) {

CHECK:SPACING: No space is necessary after a cast
#1046: FILE: drivers/net/memif/memif_socket.c:763:
+			(socklen_t *) & addr_len);

ERROR:SPACING: space prohibited after that '&' (ctx:WxW)
#1046: FILE: drivers/net/memif/memif_socket.c:763:
+			(socklen_t *) & addr_len);
 			              ^

WARNING:ONE_SEMICOLON: Statements terminations use 1 semicolon
#1121: FILE: drivers/net/memif/memif_socket.c:838:
+			goto error;;

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1129: FILE: drivers/net/memif/memif_socket.c:846:
+		if (ret < 0) {
+			goto error;
+		}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1133: FILE: drivers/net/memif/memif_socket.c:850:
+		if (ret < 0) {
+			goto error;
+		}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1137: FILE: drivers/net/memif/memif_socket.c:854:
+		if (ret < 0) {
+			goto error;
+		}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1201: FILE: drivers/net/memif/memif_socket.c:918:
+		if (socket == NULL) {
+			return -1;
+		}

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'socket->listener != 0'
#1212: FILE: drivers/net/memif/memif_socket.c:929:
+	if ((socket->listener != 0) && (pmd->role == MEMIF_ROLE_SLAVE)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->role == MEMIF_ROLE_SLAVE'
#1212: FILE: drivers/net/memif/memif_socket.c:929:
+	if ((socket->listener != 0) && (pmd->role == MEMIF_ROLE_SLAVE)) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1249: FILE: drivers/net/memif/memif_socket.c:966:
+	if (hash == NULL) {
+		return;
+	}

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->rx_queues == NULL'
#1282: FILE: drivers/net/memif/memif_socket.c:999:
+	if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+	    (pmd->socket_filename == NULL)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->tx_queues == NULL'
#1282: FILE: drivers/net/memif/memif_socket.c:999:
+	if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+	    (pmd->socket_filename == NULL)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->socket_filename == NULL'
#1282: FILE: drivers/net/memif/memif_socket.c:999:
+	if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+	    (pmd->socket_filename == NULL)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->rx_queues == NULL'
#1301: FILE: drivers/net/memif/memif_socket.c:1018:
+	if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+	    (pmd->socket_filename == NULL)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->tx_queues == NULL'
#1301: FILE: drivers/net/memif/memif_socket.c:1018:
+	if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+	    (pmd->socket_filename == NULL)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->socket_filename == NULL'
#1301: FILE: drivers/net/memif/memif_socket.c:1018:
+	if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+	    (pmd->socket_filename == NULL)) {

WARNING:TYPO_SPELLING: 'controll' may be misspelled - perhaps 'control'?
#1352: FILE: drivers/net/memif/memif_socket.c:1069:
+			"for controll fd", rte_vdev_device_name(pmd->vdev));

WARNING:TYPO_SPELLING: 'mesage' may be misspelled - perhaps 'message'?
#1417: FILE: drivers/net/memif/memif_socket.h:43:
+/* Control mesage queue. */

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#1491: FILE: drivers/net/memif/rte_eth_memif.c:40:
+static const char *valid_arguments[] = {

CHECK:SPACING: No space is necessary after a cast
#1523: FILE: drivers/net/memif/rte_eth_memif.c:72:
+	dev_info->max_rx_pktlen = (uint32_t) ETH_FRAME_LEN;

CHECK:SPACING: No space is necessary after a cast
#1541: FILE: drivers/net/memif/rte_eth_memif.c:90:
+	return (memif_ring_t *) p;

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1545: FILE: drivers/net/memif/rte_eth_memif.c:94:
+				     memif_desc_t * d)

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1629: FILE: drivers/net/memif/rte_eth_memif.c:178:
+		if (d0->flags & MEMIF_DESC_FLAG_NEXT) {
+			goto next_slot;
+		}

CHECK:BRACES: Blank lines aren't necessary before a close brace '}'
#1636: FILE: drivers/net/memif/rte_eth_memif.c:185:
+
+	}

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1641: FILE: drivers/net/memif/rte_eth_memif.c:190:
+		ring->tail = mq->last_head = cur_slot;

CHECK:SPACING: No space is necessary after a cast
#1823: FILE: drivers/net/memif/rte_eth_memif.c:372:
+		    (uint32_t) (pmd->run.buffer_size *

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1875: FILE: drivers/net/memif/rte_eth_memif.c:424:
+		ring->head = ring->tail = 0;

CHECK:SPACING: No space is necessary after a cast
#1882: FILE: drivers/net/memif/rte_eth_memif.c:431:
+			    (uint32_t) (slot * pmd->run.buffer_size);

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1889: FILE: drivers/net/memif/rte_eth_memif.c:438:
+		ring->head = ring->tail = 0;

CHECK:SPACING: No space is necessary after a cast
#1897: FILE: drivers/net/memif/rte_eth_memif.c:446:
+			    (uint32_t) (slot * pmd->run.buffer_size);

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1915: FILE: drivers/net/memif/rte_eth_memif.c:464:
+		mq->last_head = mq->last_tail = 0;

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1932: FILE: drivers/net/memif/rte_eth_memif.c:481:
+		mq->last_head = mq->last_tail = 0;

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1948: FILE: drivers/net/memif/rte_eth_memif.c:497:
+	if (ret < 0) {
+		return ret;
+	}

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1991: FILE: drivers/net/memif/rte_eth_memif.c:540:
+		mq->ring->head = mq->ring->tail = mq->last_head =

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1994: FILE: drivers/net/memif/rte_eth_memif.c:543:
+		if (pmd->role == MEMIF_ROLE_MASTER) {
+			mq->ring->flags = MEMIF_RING_FLAG_MASK_INT;
+		}

CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#2007: FILE: drivers/net/memif/rte_eth_memif.c:556:
+		mq->ring->head = mq->ring->tail = mq->last_head =

WARNING:BRACES: braces {} are not necessary for single statement blocks
#2010: FILE: drivers/net/memif/rte_eth_memif.c:559:
+		if (pmd->role == MEMIF_ROLE_SLAVE) {
+			mq->ring->flags = MEMIF_RING_FLAG_MASK_INT;
+		}

WARNING:NAKED_SSCANF: unchecked sscanf return value
#2310: FILE: drivers/net/memif/rte_eth_memif.c:859:
+	sscanf(eth_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
+	       &pmd->eth_addr.addr_bytes[0], &pmd->eth_addr.addr_bytes[1],
+	       &pmd->eth_addr.addr_bytes[2], &pmd->eth_addr.addr_bytes[3],
+	       &pmd->eth_addr.addr_bytes[4], &pmd->eth_addr.addr_bytes[5]);

CHECK:SPACING: No space is necessary after a cast
#2349: FILE: drivers/net/memif/rte_eth_memif.c:898:
+	uint32_t *flags = (uint32_t *) extra_args;

CHECK:SPACING: No space is necessary after a cast
#2365: FILE: drivers/net/memif/rte_eth_memif.c:914:
+	memif_interface_id_t *id = (memif_interface_id_t *) extra_args;

WARNING:UNNECESSARY_INT: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
#2374: FILE: drivers/net/memif/rte_eth_memif.c:923:
+	unsigned long int tmp;

CHECK:SPACING: No space is necessary after a cast
#2375: FILE: drivers/net/memif/rte_eth_memif.c:924:
+	uint16_t *buffer_size = (uint16_t *) extra_args;

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp == 0'
#2378: FILE: drivers/net/memif/rte_eth_memif.c:927:
+	if ((tmp == 0) || (tmp > 0xFFFF)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp > 0xFFFF'
#2378: FILE: drivers/net/memif/rte_eth_memif.c:927:
+	if ((tmp == 0) || (tmp > 0xFFFF)) {

WARNING:UNNECESSARY_INT: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
#2389: FILE: drivers/net/memif/rte_eth_memif.c:938:
+	unsigned long int tmp;

CHECK:SPACING: No space is necessary after a cast
#2391: FILE: drivers/net/memif/rte_eth_memif.c:940:
+	    (memif_log2_ring_size_t *) extra_args;

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp == 0'
#2394: FILE: drivers/net/memif/rte_eth_memif.c:943:
+	if ((tmp == 0) || (tmp > ETH_MEMIF_MAX_LOG2_RING_SIZE)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp > ETH_MEMIF_MAX_LOG2_RING_SIZE'
#2394: FILE: drivers/net/memif/rte_eth_memif.c:943:
+	if ((tmp == 0) || (tmp > ETH_MEMIF_MAX_LOG2_RING_SIZE)) {

WARNING:UNNECESSARY_INT: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
#2406: FILE: drivers/net/memif/rte_eth_memif.c:955:
+	unsigned long int tmp;

CHECK:SPACING: No space is necessary after a cast
#2407: FILE: drivers/net/memif/rte_eth_memif.c:956:
+	uint16_t *nq = (uint16_t *) extra_args;

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp == 0'
#2410: FILE: drivers/net/memif/rte_eth_memif.c:959:
+	if ((tmp == 0) || (tmp > 0xFF)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp > 0xFF'
#2410: FILE: drivers/net/memif/rte_eth_memif.c:959:
+	if ((tmp == 0) || (tmp > 0xFF)) {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'dir == NULL'
#2436: FILE: drivers/net/memif/rte_eth_memif.c:985:
+	if ((dir == NULL) || (faccessat(-1, dir, F_OK | R_OK |
+					W_OK, AT_EACCESS) < 0)) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#2542: FILE: drivers/net/memif/rte_eth_memif.c:1091:
+				if (strcmp(pair->key, ETH_MEMIF_MAC_ARG) == 0) {
+					eth_addr = pair->value;
+				}

ERROR:SPACING: space required after that ',' (ctx:VxV)
#2666: FILE: drivers/net/memif/rte_eth_memif.h:37:
+#define memif_min(a,b) (((a) < (b)) ? (a) : (b))
                    ^

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects?
#2666: FILE: drivers/net/memif/rte_eth_memif.h:37:
+#define memif_min(a,b) (((a) < (b)) ? (a) : (b))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#2666: FILE: drivers/net/memif/rte_eth_memif.h:37:
+#define memif_min(a,b) (((a) < (b)) ? (a) : (b))

WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#2668: FILE: drivers/net/memif/rte_eth_memif.h:39:
+#define MIF_LOG(level, fmt, args...) \
+do {							\
+	rte_log(RTE_LOG_ ## level, memif_logtype,	\
+		"%s(): " fmt "
", __func__, ##args);	\
+} while (0)

total: 11 errors, 30 warnings, 2739 lines checked

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-10 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20181210100639.30244-1-jgrajcia@cisco.com>
2018-12-10 10:08 ` [dpdk-test-report] |WARNING| pw48619 [RFC, v2] /net: memory interface (memif) checkpatch

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).