From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: jianmingfan <jianmingfan@126.com>
Subject: [dpdk-test-report] |WARNING| pw47958 mem: accelerate dpdk program startup by reuse page from page cache
Date: Fri, 9 Nov 2018 08:59:47 +0100 (CET) [thread overview]
Message-ID: <20181109075947.DE0E54CA5@dpdk.org> (raw)
In-Reply-To: <20181109075830.27265-1-jianmingfan@126.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/47958
_coding style issues_
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#15:
During procless startup, dpdk invokes clear_hugedir() to unlink all hugepage files under /dev/hugepages.
WARNING:BRACES: braces {} are not necessary for single statement blocks
#115: FILE: lib/librte_eal/common/malloc_heap.c:174:
+ if (elem == NULL) {
+ return NULL;
+ }
ERROR:CODE_INDENT: code indent should use tabs where possible
#179: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:76:
+ if (reuse == 1) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#179: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:76:
+ if (reuse == 1) {$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#179: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:76:
+ if (reuse == 1) {
+ nr_hp_file = "nr_hugepages";
WARNING:BRACES: braces {} are not necessary for single statement blocks
#179: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:76:
+ if (reuse == 1) {
+ nr_hp_file = "nr_hugepages";
+ }
ERROR:CODE_INDENT: code indent should use tabs where possible
#180: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:77:
+ nr_hp_file = "nr_hugepages";$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#180: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:77:
+ nr_hp_file = "nr_hugepages";$
ERROR:CODE_INDENT: code indent should use tabs where possible
#181: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:78:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#181: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:78:
+ }$
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#194: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:137:
+ * */
ERROR:SPACING: space prohibited before that close parenthesis ')'
#209: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:152:
+ if (mp == NULL || nr_pages <= 0 || pagesize == 0 ) {
ERROR:SPACING: space prohibited after that open parenthesis '('
#229: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:172:
+ if ( strncmp(dirent->d_name, ".", 1 ) == 0
ERROR:SPACING: space prohibited before that close parenthesis ')'
#229: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:172:
+ if ( strncmp(dirent->d_name, ".", 1 ) == 0
ERROR:SPACING: space prohibited before that close parenthesis ')'
#230: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:173:
+ || strncmp(dirent->d_name, "..", 2 ) == 0 ) {
ERROR:SPACING: space prohibited before that close parenthesis ')'
#236: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:179:
+ && strncmp(dirent->d_name, ".", 1 ) != 0
ERROR:SPACING: space prohibited before that close parenthesis ')'
#237: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:180:
+ && strncmp(dirent->d_name, "..", 2 ) != 0 ) {
ERROR:SPACING: space prohibited after that open parenthesis '('
#254: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:197:
+ if ( fstat( fd, &file_stat ) < 0 ) {
ERROR:SPACING: space prohibited before that close parenthesis ')'
#254: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:197:
+ if ( fstat( fd, &file_stat ) < 0 ) {
ERROR:SPACING: space prohibited after that open parenthesis '('
#260: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:203:
+ if ( (uint64_t)file_stat.st_size != pagesize ) {
ERROR:SPACING: space prohibited before that close parenthesis ')'
#260: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:203:
+ if ( (uint64_t)file_stat.st_size != pagesize ) {
WARNING:LONG_LINE: line over 90 characters
#267: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:210:
+ file_mmap = mmap((void *)0, pagesize, PROT_READ, MAP_SHARED|MAP_POPULATE, fd, 0);
ERROR:SPACING: space prohibited after that open parenthesis '('
#268: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:211:
+ if ( file_mmap == MAP_FAILED ) {
ERROR:SPACING: space prohibited before that close parenthesis ')'
#268: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:211:
+ if ( file_mmap == MAP_FAILED ) {
ERROR:SPACING: space prohibited after that open parenthesis '('
#274: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:217:
+ if ( mincore(file_mmap, pagesize, mincore_vec) != 0 ) {
ERROR:SPACING: space prohibited before that close parenthesis ')'
#274: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:217:
+ if ( mincore(file_mmap, pagesize, mincore_vec) != 0 ) {
ERROR:SPACING: space prohibited after that '!' (ctx:BxW)
#280: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:223:
+ if (! (mincore_vec[0] & 1) ){
^
ERROR:SPACING: space required before the open brace '{'
#280: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:223:
+ if (! (mincore_vec[0] & 1) ){
ERROR:SPACING: space prohibited before that close parenthesis ')'
#280: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:223:
+ if (! (mincore_vec[0] & 1) ){
ERROR:SPACING: space required after that close brace '}'
#290: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:233:
+ }/*for loop end*/
WARNING:TYPO_SPELLING: 'successfull' may be misspelled - perhaps 'successful'?
#297: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:240:
+ /*the successfull case*/
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#316: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:259:
+ * */
WARNING:BRACES: braces {} are not necessary for single statement blocks
#331: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:274:
+ if (dir == NULL) {
+ return 0;
+ }
WARNING:TYPO_SPELLING: 'happend' may be misspelled - perhaps 'happened'?
#341: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:284:
+ /*shall not happend*/
WARNING:BRACES: braces {} are not necessary for single statement blocks
#342: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:285:
+ if (num_sizes >= MAX_HUGEPAGE_SIZES) {
+ return 0;
+ }
ERROR:SPACING: space prohibited after that open parenthesis '('
#350: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:293:
+ if ( 0 == cb_fn(hugedir, nr, hugepage_sz) ) {
ERROR:SPACING: space prohibited before that close parenthesis ')'
#350: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:293:
+ if ( 0 == cb_fn(hugedir, nr, hugepage_sz) ) {
WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#350: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:293:
+ if ( 0 == cb_fn(hugedir, nr, hugepage_sz) ) {
WARNING:BRACES: braces {} are not necessary for single statement blocks
#350: FILE: lib/librte_eal/linuxapp/eal/eal_hugepage_info.c:293:
+ if ( 0 == cb_fn(hugedir, nr, hugepage_sz) ) {
+ return 0;
+ }
ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s)
total: 24 errors, 16 warnings, 329 lines checked
parent reply other threads:[~2018-11-09 7:59 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20181109075830.27265-1-jianmingfan@126.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=20181109075947.DE0E54CA5@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=jianmingfan@126.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).