From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 469EB45879 for ; Tue, 27 Aug 2024 17:13:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F9BC40E2D; Tue, 27 Aug 2024 17:13:06 +0200 (CEST) Received: from dpdk.org (dpdk.org [92.243.24.197]) by mails.dpdk.org (Postfix) with ESMTP id 92C7D40E1B for ; Tue, 27 Aug 2024 17:12:58 +0200 (CEST) Received: by dpdk.org (Postfix, from userid 65534) id 896FF120778; Tue, 27 Aug 2024 17:12:58 +0200 (CEST) Subject: |WARNING| pw143403 [RFC 1/2] eal: add llc aware functions In-Reply-To: <20240827151014.201-2-vipin.varghese@amd.com> References: <20240827151014.201-2-vipin.varghese@amd.com> To: test-report@dpdk.org From: checkpatch@dpdk.org Cc: Vipin Varghese Message-Id: <20240827151258.896FF120778@dpdk.org> Date: Tue, 27 Aug 2024 17:12:58 +0200 (CEST) X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: checkpatch Test-Status: WARNING http://dpdk.org/patch/143403 _coding style issues_ WARNING:SPACING: space prohibited between function name and open parenthesis '(' #148: FILE: lib/eal/common/eal_common_lcore.c:102: +unsigned int rte_get_llc_first_lcores (rte_cpuset_t *llc_cpu) ERROR:OPEN_BRACE: that open brace { should be on the previous line #165: FILE: lib/eal/common/eal_common_lcore.c:110: + for (unsigned int lcore =0; lcore < RTE_MAX_LCORE; lcore++) + { ERROR:SPACING: spaces required around that '=' (ctx:WxV) #165: FILE: lib/eal/common/eal_common_lcore.c:110: + for (unsigned int lcore =0; lcore < RTE_MAX_LCORE; lcore++) ^ WARNING:SPACING: space prohibited between function name and open parenthesis '(' #167: FILE: lib/eal/common/eal_common_lcore.c:112: + if (!rte_lcore_is_enabled (lcore)) WARNING:SPACING: space prohibited between function name and open parenthesis '(' #172: FILE: lib/eal/common/eal_common_lcore.c:117: + FILE *fp = popen (cmdline, "r"); WARNING:BRACES: braces {} are not necessary for single statement blocks #173: FILE: lib/eal/common/eal_common_lcore.c:118: + if (fp == NULL) { + return -1; } WARNING:SPACING: space prohibited between function name and open parenthesis '(' #182: FILE: lib/eal/common/eal_common_lcore.c:126: + int llc_index = atoi (output_llc); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #186: FILE: lib/eal/common/eal_common_lcore.c:130: + fp = popen (cmdline, "r"); WARNING:BRACES: braces {} are not necessary for single statement blocks #187: FILE: lib/eal/common/eal_common_lcore.c:131: + if (fp == NULL) { + return -1; + } ERROR:BRACKET_SPACE: space prohibited before open square bracket '[' #196: FILE: lib/eal/common/eal_common_lcore.c:140: + output_threads [strlen(output_threads) - 1] = ''; ERROR:CODE_INDENT: code indent should use tabs where possible #197: FILE: lib/eal/common/eal_common_lcore.c:141: +^I char *smt_thrds[2];$ WARNING:LONG_LINE: line length of 106 exceeds 100 columns #198: FILE: lib/eal/common/eal_common_lcore.c:142: + int smt_threads = rte_strsplit(output_threads, sizeof(output_threads), smt_thrds, 2, ','); WARNING:LONG_LINE: line length of 108 exceeds 100 columns #202: FILE: lib/eal/common/eal_common_lcore.c:146: + int smt_cpu = rte_strsplit(smt_thrds[index], sizeof(smt_thrds[index]), llc, 2, '-'); ERROR:TRAILING_WHITESPACE: trailing whitespace #204: FILE: lib/eal/common/eal_common_lcore.c:148: +^I$ WARNING:SPACING: space prohibited between function name and open parenthesis '(' #205: FILE: lib/eal/common/eal_common_lcore.c:149: + unsigned int first_cpu = atoi (llc[0]); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #206: FILE: lib/eal/common/eal_common_lcore.c:150: + unsigned int last_cpu = (NULL == llc[1]) ? atoi (llc[0]) : atoi (llc[1]); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #206: FILE: lib/eal/common/eal_common_lcore.c:150: + unsigned int last_cpu = (NULL == llc[1]) ? atoi (llc[0]) : atoi (llc[1]); WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test #206: FILE: lib/eal/common/eal_common_lcore.c:150: + unsigned int last_cpu = (NULL == llc[1]) ? atoi (llc[0]) : atoi (llc[1]); ERROR:TRAILING_WHITESPACE: trailing whitespace #207: FILE: lib/eal/common/eal_common_lcore.c:151: +^I^I$ ERROR:TRAILING_WHITESPACE: trailing whitespace #208: FILE: lib/eal/common/eal_common_lcore.c:152: +^I$ WARNING:SPACING: space prohibited between function name and open parenthesis '(' #211: FILE: lib/eal/common/eal_common_lcore.c:155: + CPU_SET (temp_cpu, (rte_cpuset_t *) llc_cpu); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #223: FILE: lib/eal/common/eal_common_lcore.c:167: +rte_get_llc_lcore (unsigned int lcore, rte_cpuset_t *llc_cpu, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #224: FILE: lib/eal/common/eal_common_lcore.c:168: + unsigned int *first_cpu, unsigned int * last_cpu) WARNING:SPACING: space prohibited between function name and open parenthesis '(' #236: FILE: lib/eal/common/eal_common_lcore.c:180: + FILE *fp = popen (cmdline, "r"); WARNING:BRACES: braces {} are not necessary for single statement blocks #237: FILE: lib/eal/common/eal_common_lcore.c:181: + if (fp == NULL) { + return -1; + } WARNING:SPACING: space prohibited between function name and open parenthesis '(' #245: FILE: lib/eal/common/eal_common_lcore.c:189: + int llc_index = atoi (output_llc); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #249: FILE: lib/eal/common/eal_common_lcore.c:193: + fp = popen (cmdline, "r"); WARNING:BRACES: braces {} are not necessary for single statement blocks #250: FILE: lib/eal/common/eal_common_lcore.c:194: + if (fp == NULL) { + return -1; + } ERROR:BRACKET_SPACE: space prohibited before open square bracket '[' #261: FILE: lib/eal/common/eal_common_lcore.c:204: + output_threads [strlen(output_threads) - 1] = ''; ERROR:CODE_INDENT: code indent should use tabs where possible #262: FILE: lib/eal/common/eal_common_lcore.c:205: + char *smt_thrds[2];$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #262: FILE: lib/eal/common/eal_common_lcore.c:205: + char *smt_thrds[2];$ WARNING:SPACING: space prohibited between function name and open parenthesis '(' #275: FILE: lib/eal/common/eal_common_lcore.c:218: + *first_cpu = strtoul (llc[0], end, 10); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #276: FILE: lib/eal/common/eal_common_lcore.c:219: + *last_cpu = (1 == smt_cpu) ? strtoul (llc[0], end, 10) : strtoul (llc[1], end, 10); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #276: FILE: lib/eal/common/eal_common_lcore.c:219: + *last_cpu = (1 == smt_cpu) ? strtoul (llc[0], end, 10) : strtoul (llc[1], end, 10); WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test #276: FILE: lib/eal/common/eal_common_lcore.c:219: + *last_cpu = (1 == smt_cpu) ? strtoul (llc[0], end, 10) : strtoul (llc[1], end, 10); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #281: FILE: lib/eal/common/eal_common_lcore.c:224: + CPU_SET (temp_cpu, (rte_cpuset_t *) llc_cpu); WARNING:LONG_LINE_COMMENT: line length of 118 exceeds 100 columns #282: FILE: lib/eal/common/eal_common_lcore.c:225: + //printf ("rte_get_llc_lcore: temp_cpu %u count %u ", temp_cpu, CPU_COUNT(llc_cpu)); ERROR:C99_COMMENTS: do not use C99 // comments #282: FILE: lib/eal/common/eal_common_lcore.c:225: + //printf ("rte_get_llc_lcore: temp_cpu %u count %u ", temp_cpu, CPU_COUNT(llc_cpu)); WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline #282: FILE: lib/eal/common/eal_common_lcore.c:225: + //printf ("rte_get_llc_lcore: temp_cpu %u count %u ", temp_cpu, CPU_COUNT(llc_cpu)); ERROR:CODE_INDENT: code indent should use tabs where possible #285: FILE: lib/eal/common/eal_common_lcore.c:228: +^I^I^I^I ^Ifirst_lcore_cpu = temp_cpu;$ WARNING:SPACE_BEFORE_TAB: please, no space before tabs #285: FILE: lib/eal/common/eal_common_lcore.c:228: +^I^I^I^I ^Ifirst_lcore_cpu = temp_cpu;$ WARNING:LONG_LINE_COMMENT: line length of 109 exceeds 100 columns #290: FILE: lib/eal/common/eal_common_lcore.c:233: + //printf ("rte_get_llc_lcore: first %u last %u ", first_lcore_cpu, last_lcore_cpu); ERROR:C99_COMMENTS: do not use C99 // comments #290: FILE: lib/eal/common/eal_common_lcore.c:233: + //printf ("rte_get_llc_lcore: first %u last %u ", first_lcore_cpu, last_lcore_cpu); WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline #290: FILE: lib/eal/common/eal_common_lcore.c:233: + //printf ("rte_get_llc_lcore: first %u last %u ", first_lcore_cpu, last_lcore_cpu); WARNING:LONG_LINE_COMMENT: line length of 112 exceeds 100 columns #297: FILE: lib/eal/common/eal_common_lcore.c:240: + //printf ("rte_get_llc_lcore: first %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); ERROR:C99_COMMENTS: do not use C99 // comments #297: FILE: lib/eal/common/eal_common_lcore.c:240: + //printf ("rte_get_llc_lcore: first %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline #297: FILE: lib/eal/common/eal_common_lcore.c:240: + //printf ("rte_get_llc_lcore: first %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); WARNING:SPACING: space prohibited between function name and open parenthesis '(' #302: FILE: lib/eal/common/eal_common_lcore.c:245: +rte_get_llc_n_lcore (unsigned int lcore, rte_cpuset_t *llc_cpu, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #303: FILE: lib/eal/common/eal_common_lcore.c:246: + unsigned int *first_cpu, unsigned int * last_cpu, WARNING:SPACING: space prohibited between function name and open parenthesis '(' #312: FILE: lib/eal/common/eal_common_lcore.c:255: + unsigned int count = rte_get_llc_lcore (lcore, llc_cpu, first_cpu, last_cpu); WARNING:LONG_LINE_COMMENT: line length of 114 exceeds 100 columns #314: FILE: lib/eal/common/eal_common_lcore.c:257: + //printf ("rte_get_llc_n_lcore: first %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); ERROR:C99_COMMENTS: do not use C99 // comments #314: FILE: lib/eal/common/eal_common_lcore.c:257: + //printf ("rte_get_llc_n_lcore: first %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline #314: FILE: lib/eal/common/eal_common_lcore.c:257: + //printf ("rte_get_llc_n_lcore: first %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); WARNING:LONG_LINE_COMMENT: line length of 176 exceeds 100 columns #325: FILE: lib/eal/common/eal_common_lcore.c:268: + //printf ("rte_get_llc_n_lcore: temp - count %d cpu %u skip %u first %u last %u ", temp_count, temp_cpu, skip, *first_cpu, *last_cpu); ERROR:C99_COMMENTS: do not use C99 // comments #325: FILE: lib/eal/common/eal_common_lcore.c:268: + //printf ("rte_get_llc_n_lcore: temp - count %d cpu %u skip %u first %u last %u ", temp_count, temp_cpu, skip, *first_cpu, *last_cpu); WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline #325: FILE: lib/eal/common/eal_common_lcore.c:268: + //printf ("rte_get_llc_n_lcore: temp - count %d cpu %u skip %u first %u last %u ", temp_count, temp_cpu, skip, *first_cpu, *last_cpu); ERROR:TRAILING_WHITESPACE: trailing whitespace #334: FILE: lib/eal/common/eal_common_lcore.c:277: +^I^I^I^I} $ WARNING:LONG_LINE_COMMENT: line length of 121 exceeds 100 columns #339: FILE: lib/eal/common/eal_common_lcore.c:282: + //printf ("rte_get_llc_n_lcore: start %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); ERROR:C99_COMMENTS: do not use C99 // comments #339: FILE: lib/eal/common/eal_common_lcore.c:282: + //printf ("rte_get_llc_n_lcore: start %u last %u count %u ", *first_cpu, *last_cpu, CPU_COUNT(llc_cpu)); WARNING:LONG_LINE_COMMENT: line length of 105 exceeds 100 columns #365: FILE: lib/eal/common/eal_common_lcore.c:308: + //printf ("rte_get_llc_n_lcore: start %u last %u count %u ", *first_cpu, *last_cpu, total_core); ERROR:C99_COMMENTS: do not use C99 // comments #365: FILE: lib/eal/common/eal_common_lcore.c:308: + //printf ("rte_get_llc_n_lcore: start %u last %u count %u ", *first_cpu, *last_cpu, total_core); WARNING:IF_0: Consider removing the code enclosed by this #if 0 and its #endif #367: FILE: lib/eal/common/eal_common_lcore.c:310: +#if 0 ERROR:OPEN_BRACE: that open brace { should be on the previous line #370: FILE: lib/eal/common/eal_common_lcore.c:313: + for (; (start <= end); start++) + { WARNING:LONG_LINE: line length of 101 exceeds 100 columns #376: FILE: lib/eal/common/eal_common_lcore.c:319: + temp_last_cpu = (false == is_last_cpu) ? (start - 1) : temp_last_cpu; WARNING:LONG_LINE: line length of 103 exceeds 100 columns #392: FILE: lib/eal/common/eal_common_lcore.c:335: + for (unsigned int start = *first_cpu, end = *last_cpu; (start <= end) && (temp_count); start++) ERROR:OPEN_BRACE: that open brace { should be on the previous line #392: FILE: lib/eal/common/eal_common_lcore.c:335: + for (unsigned int start = *first_cpu, end = *last_cpu; (start <= end) && (temp_count); start++) + { ERROR:CODE_INDENT: code indent should use tabs where possible #409: FILE: lib/eal/common/eal_common_lcore.c:352: + i++;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #409: FILE: lib/eal/common/eal_common_lcore.c:352: + i++;$ ERROR:CODE_INDENT: code indent should use tabs where possible #410: FILE: lib/eal/common/eal_common_lcore.c:353: + if (wrap)$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #410: FILE: lib/eal/common/eal_common_lcore.c:353: + if (wrap)$ ERROR:CODE_INDENT: code indent should use tabs where possible #411: FILE: lib/eal/common/eal_common_lcore.c:354: + i %= RTE_MAX_LCORE;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #411: FILE: lib/eal/common/eal_common_lcore.c:354: + i %= RTE_MAX_LCORE;$ ERROR:CODE_INDENT: code indent should use tabs where possible #413: FILE: lib/eal/common/eal_common_lcore.c:356: + while (i < RTE_MAX_LCORE) {$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #413: FILE: lib/eal/common/eal_common_lcore.c:356: + while (i < RTE_MAX_LCORE) {$ ERROR:CODE_INDENT: code indent should use tabs where possible #414: FILE: lib/eal/common/eal_common_lcore.c:357: + if (!rte_lcore_is_enabled(i) ||$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #414: FILE: lib/eal/common/eal_common_lcore.c:357: + if (!rte_lcore_is_enabled(i) ||$ ERROR:CODE_INDENT: code indent should use tabs where possible #415: FILE: lib/eal/common/eal_common_lcore.c:358: + (skip_main && (i == rte_get_main_lcore()))) {$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #415: FILE: lib/eal/common/eal_common_lcore.c:358: + (skip_main && (i == rte_get_main_lcore()))) {$ ERROR:CODE_INDENT: code indent should use tabs where possible #416: FILE: lib/eal/common/eal_common_lcore.c:359: + i++;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #416: FILE: lib/eal/common/eal_common_lcore.c:359: + i++;$ ERROR:CODE_INDENT: code indent should use tabs where possible #417: FILE: lib/eal/common/eal_common_lcore.c:360: + if (wrap)$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #417: FILE: lib/eal/common/eal_common_lcore.c:360: + if (wrap)$ ERROR:CODE_INDENT: code indent should use tabs where possible #418: FILE: lib/eal/common/eal_common_lcore.c:361: + i %= RTE_MAX_LCORE;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #418: FILE: lib/eal/common/eal_common_lcore.c:361: + i %= RTE_MAX_LCORE;$ ERROR:CODE_INDENT: code indent should use tabs where possible #419: FILE: lib/eal/common/eal_common_lcore.c:362: + continue;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #419: FILE: lib/eal/common/eal_common_lcore.c:362: + continue;$ ERROR:CODE_INDENT: code indent should use tabs where possible #420: FILE: lib/eal/common/eal_common_lcore.c:363: + }$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #420: FILE: lib/eal/common/eal_common_lcore.c:363: + }$ ERROR:CODE_INDENT: code indent should use tabs where possible #421: FILE: lib/eal/common/eal_common_lcore.c:364: + break;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #421: FILE: lib/eal/common/eal_common_lcore.c:364: + break;$ ERROR:CODE_INDENT: code indent should use tabs where possible #422: FILE: lib/eal/common/eal_common_lcore.c:365: + }$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #422: FILE: lib/eal/common/eal_common_lcore.c:365: + }$ ERROR:CODE_INDENT: code indent should use tabs where possible #423: FILE: lib/eal/common/eal_common_lcore.c:366: + return i;$ WARNING:LEADING_SPACE: please, no spaces at the start of a line #423: FILE: lib/eal/common/eal_common_lcore.c:366: + return i;$ total: 36 errors, 58 warnings, 298 lines checked Warning in lib/eal/common/eal_common_lcore.c: Writing to stdout or stderr