From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [dpdk-test-report] |WARNING| pw32467 [PATCH RFC v2 11/23] eal: replace memseg with memseg lists
Date: Tue, 19 Dec 2017 12:15:41 +0100 (CET) [thread overview]
Message-ID: <20171219111541.2B1821B24E@dpdk.org> (raw)
In-Reply-To: <47525ef673993d1b0fa091c3b8b7305d5ccec671.1513681966.git.anatoly.burakov@intel.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/32467
_coding style issues_
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#148: FILE: drivers/net/virtio/virtio_user/vhost_kernel.c:103:
+static int
+add_memory_region(struct vhost_memory_region *mr, const struct rte_fbarray *arr,
+ int reg_start_idx, int max) {
ERROR:SPACING: space required before the open brace '{'
#162: FILE: drivers/net/virtio/virtio_user/vhost_kernel.c:117:
+ while (idx < max){
CHECK:BRACES: braces {} should be used on all arms of this statement
#164: FILE: drivers/net/virtio/virtio_user/vhost_kernel.c:119:
+ if (expected_addr == NULL) {
[...]
+ } else if (ms->addr != expected_addr)
[...]
CHECK:SPACING: No space is necessary after a cast
#173: FILE: drivers/net/virtio/virtio_user/vhost_kernel.c:128:
+ mr->guest_phys_addr = (uint64_t)(uintptr_t) start_addr;
CHECK:SPACING: No space is necessary after a cast
#174: FILE: drivers/net/virtio/virtio_user/vhost_kernel.c:129:
+ mr->userspace_addr = (uint64_t)(uintptr_t) start_addr;
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#301: FILE: lib/librte_eal/common/eal_common_memory.c:123:
+static uint64_t
+get_mem_amount(uint64_t page_sz) {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#312: FILE: lib/librte_eal/common/eal_common_memory.c:134:
+static int
+get_max_num_pages(uint64_t page_sz, uint64_t mem_amount) {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#317: FILE: lib/librte_eal/common/eal_common_memory.c:139:
+static int
+get_min_num_pages(int max_pages) {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#322: FILE: lib/librte_eal/common/eal_common_memory.c:144:
+static int
+alloc_memseg_list(struct rte_memseg_list *msl, uint64_t page_sz,
+ int socket_id) {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#361: FILE: lib/librte_eal/common/eal_common_memory.c:183:
+static int
+memseg_init(void) {
WARNING:BRACES: braces {} are not necessary for single statement blocks
#390: FILE: lib/librte_eal/common/eal_common_memory.c:212:
+ if (alloc_memseg_list(msl, hugepage_sz, socket_id)) {
+ return -1;
+ }
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#398: FILE: lib/librte_eal/common/eal_common_memory.c:220:
+static const struct rte_memseg *
+virt2memseg(const void *addr, const struct rte_memseg_list *msl) {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#437: FILE: lib/librte_eal/common/eal_common_memory.c:259:
+static const struct rte_memseg *
+virt2memseg_legacy(const void *addr) {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#463: FILE: lib/librte_eal/common/eal_common_memory.c:285:
+const struct rte_memseg *
+rte_mem_virt2memseg(const void *addr, const struct rte_memseg_list *msl) {
WARNING:BRACES: braces {} are not necessary for any arm of this statement
#466: FILE: lib/librte_eal/common/eal_common_memory.c:288:
+ if (internal_config.legacy_mem) {
[...]
+ } else {
[...]
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#960: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:932:
+static struct rte_memseg_list *
+get_memseg_list(int socket, uint64_t page_sz) {
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1115: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1349:
+ unsigned i;
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1117: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1351:
+ unsigned cur_seg, max_seg;
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1285: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1468:
+ * entries before it did the second mmap of them */
ERROR:SPACING: space required before the open brace '{'
#1286: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1469:
+ for (i = 0; i < num_hp && offset < ms->len; i++){
WARNING:LONG_LINE: line over 90 characters
#1297: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1480:
+ mapping_size, PROT_READ | PROT_WRITE,
WARNING:LONG_LINE_COMMENT: line over 90 characters
#1299: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1482:
+ close(fd); /* close file both on success and on failure */
WARNING:LONG_LINE: line over 90 characters
#1301: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1484:
+ addr != RTE_PTR_ADD(base_addr, offset)) {
ERROR:SPACING: spaces required around that '+=' (ctx:VxV)
#1306: FILE: lib/librte_eal/linuxapp/eal/eal_memory.c:1489:
+ offset+=mapping_size;
^
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1690: FILE: test/test/test_memory.c:104:
+ for (j = 0; j < ms->len; j++) {
+ *((volatile uint8_t *) ms->addr + j);
+ }
total: 13 errors, 9 warnings, 1536 lines checked
parent reply other threads:[~2017-12-19 11:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <47525ef673993d1b0fa091c3b8b7305d5ccec671.1513681966.git.anatoly.burakov@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=20171219111541.2B1821B24E@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=anatoly.burakov@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).