From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Howard Wang <howard_wang@realsil.com.cn>
Subject: |WARNING| pw144428 [PATCH] net/r8169: add support for hw initialization
Date: Wed, 25 Sep 2024 09:55:10 +0200 (CEST) [thread overview]
Message-ID: <20240925075510.E7CEB121D9E@dpdk.org> (raw)
In-Reply-To: <20240925075421.38142-1-howard_wang@realsil.com.cn>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/144428
_coding style issues_
WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one
ERROR:CODE_INDENT: code indent should use tabs where possible
#151: FILE: drivers/net/r8169/r8169_base.h:563:
+ ADVERTISE_100_HALF | ADVERTISE_100_FULL | ADVERTISE_1000_FULL | \$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#151: FILE: drivers/net/r8169/r8169_base.h:563:
+ ADVERTISE_100_HALF | ADVERTISE_100_FULL | ADVERTISE_1000_FULL | \$
ERROR:CODE_INDENT: code indent should use tabs where possible
#152: FILE: drivers/net/r8169/r8169_base.h:564:
+ ADVERTISE_2500_FULL | ADVERTISE_5000_FULL)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#152: FILE: drivers/net/r8169/r8169_base.h:564:
+ ADVERTISE_2500_FULL | ADVERTISE_5000_FULL)$
WARNING:TYPO_SPELLING: 'stdio' may be misspelled - perhaps 'studio'?
#170: FILE: drivers/net/r8169/r8169_dash.c:6:
+#include <stdio.h>
WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test
#217: FILE: drivers/net/r8169/r8169_dash.c:53:
+ if (FALSE == HW_DASH_SUPPORT_GET_FIRMWARE_VERSION(hw))
CHECK:BOOL_COMPARISON: Using comparison to FALSE is error prone
#217: FILE: drivers/net/r8169/r8169_dash.c:53:
+ if (FALSE == HW_DASH_SUPPORT_GET_FIRMWARE_VERSION(hw))
CHECK:CAMELCASE: Avoid CamelCase: <AllowAccessDashOcp>
#229: FILE: drivers/net/r8169/r8169_dash.c:65:
+ if (!hw->AllowAccessDashOcp)
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppDashVer>
#274: FILE: drivers/net/r8169/r8169_dash.h:17:
+#define HW_DASH_SUPPORT_DASH(_M) ((_M)->HwSuppDashVer > 0)
CHECK:MACRO_ARG_REUSE: Macro argument reuse '_M' - possible side-effects?
#280: FILE: drivers/net/r8169/r8169_dash.h:23:
+#define HW_DASH_SUPPORT_GET_FIRMWARE_VERSION(_M) (HW_DASH_SUPPORT_TYPE_2(_M) || \
+ HW_DASH_SUPPORT_TYPE_3(_M) || \
+ HW_DASH_SUPPORT_TYPE_4(_M))
ERROR:CODE_INDENT: code indent should use tabs where possible
#281: FILE: drivers/net/r8169/r8169_dash.h:24:
+ HW_DASH_SUPPORT_TYPE_3(_M) || \$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#281: FILE: drivers/net/r8169/r8169_dash.h:24:
+ HW_DASH_SUPPORT_TYPE_3(_M) || \$
ERROR:CODE_INDENT: code indent should use tabs where possible
#282: FILE: drivers/net/r8169/r8169_dash.h:25:
+ HW_DASH_SUPPORT_TYPE_4(_M))$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#282: FILE: drivers/net/r8169/r8169_dash.h:25:
+ HW_DASH_SUPPORT_TYPE_4(_M))$
ERROR:C99_COMMENTS: do not use C99 // comments
#317: FILE: drivers/net/r8169/r8169_ethdev.c:138:
+ //struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
ERROR:C99_COMMENTS: do not use C99 // comments
#318: FILE: drivers/net/r8169/r8169_ethdev.c:139:
+ //struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
ERROR:C99_COMMENTS: do not use C99 // comments
#326: FILE: drivers/net/r8169/r8169_ethdev.c:147:
+ //if (HW_DASH_SUPPORT_DASH(hw))
ERROR:C99_COMMENTS: do not use C99 // comments
#327: FILE: drivers/net/r8169/r8169_ethdev.c:148:
+ // rtl_driver_stop(hw);
ERROR:C99_COMMENTS: do not use C99 // comments
#342: FILE: drivers/net/r8169/r8169_ethdev.c:162:
+ //struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
ERROR:CODE_INDENT: code indent should use tabs where possible
#369: FILE: drivers/net/r8169/r8169_ethdev.c:193:
+^I^I "%02x:%02x:%02x:%02x:%02x:%02x",$
ERROR:CODE_INDENT: code indent should use tabs where possible
#370: FILE: drivers/net/r8169/r8169_ethdev.c:194:
+^I^I perm_addr->addr_bytes[0],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#371: FILE: drivers/net/r8169/r8169_ethdev.c:195:
+^I^I perm_addr->addr_bytes[1],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#372: FILE: drivers/net/r8169/r8169_ethdev.c:196:
+^I^I perm_addr->addr_bytes[2],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#373: FILE: drivers/net/r8169/r8169_ethdev.c:197:
+^I^I perm_addr->addr_bytes[3],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#374: FILE: drivers/net/r8169/r8169_ethdev.c:198:
+^I^I perm_addr->addr_bytes[4],$
ERROR:CODE_INDENT: code indent should use tabs where possible
#375: FILE: drivers/net/r8169/r8169_ethdev.c:199:
+^I^I perm_addr->addr_bytes[5]);$
CHECK:CAMELCASE: Avoid CamelCase: <HwIcVerUnknown>
#418: FILE: drivers/net/r8169/r8169_ethdev.h:42:
+ u8 HwIcVerUnknown;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppNowIsOobVer>
#439: FILE: drivers/net/r8169/r8169_ethdev.h:69:
+ u8 HwSuppNowIsOobVer;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppTxNoCloseVer>
#445: FILE: drivers/net/r8169/r8169_ethdev.h:74:
+ u8 HwSuppTxNoCloseVer;
CHECK:CAMELCASE: Avoid CamelCase: <EnableTxNoClose>
#446: FILE: drivers/net/r8169/r8169_ethdev.h:75:
+ u8 EnableTxNoClose;
CHECK:CAMELCASE: Avoid CamelCase: <MaxTxDescPtrMask>
#449: FILE: drivers/net/r8169/r8169_ethdev.h:78:
+ u32 MaxTxDescPtrMask;
ERROR:CODE_INDENT: code indent should use tabs where possible
#510: FILE: drivers/net/r8169/r8169_hw.c:954:
+ enum rtl_fc_mode fc)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#510: FILE: drivers/net/r8169/r8169_hw.c:954:
+ enum rtl_fc_mode fc)$
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppMaxPhyLinkSpeed>
#523: FILE: drivers/net/r8169/r8169_hw.c:967:
+ speed = RTE_MIN(speed, hw->HwSuppMaxPhyLinkSpeed);
ERROR:CODE_INDENT: code indent should use tabs where possible
#535: FILE: drivers/net/r8169/r8169_hw.c:979:
+^I^I ADVERTISE_100_HALF | ADVERTISE_100_FULL |$
ERROR:CODE_INDENT: code indent should use tabs where possible
#536: FILE: drivers/net/r8169/r8169_hw.c:980:
+^I^I ADVERTISE_1000_HALF | ADVERTISE_1000_FULL);$
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppOcpChannelVer>
#576: FILE: drivers/net/r8169/r8169_hw.c:1020:
+ hw->HwSuppOcpChannelVer = 2;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppCheckPhyDisableModeVer>
#632: FILE: drivers/net/r8169/r8169_hw.c:1076:
+ hw->HwSuppCheckPhyDisableModeVer = 3;
CHECK:CAMELCASE: Avoid CamelCase: <NotWrRamCodeToMicroP>
#738: FILE: drivers/net/r8169/r8169_hw.c:1182:
+ hw->NotWrRamCodeToMicroP = TRUE;
CHECK:CAMELCASE: Avoid CamelCase: <NotWrMcuPatchCode>
#739: FILE: drivers/net/r8169/r8169_hw.c:1183:
+ hw->NotWrMcuPatchCode = TRUE;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppMacMcuVer>
#745: FILE: drivers/net/r8169/r8169_hw.c:1189:
+ hw->HwSuppMacMcuVer = 2;
CHECK:CAMELCASE: Avoid CamelCase: <MacMcuPageSize>
#752: FILE: drivers/net/r8169/r8169_hw.c:1196:
+ hw->MacMcuPageSize = RTL_MAC_MCU_PAGE_SIZE;
CHECK:CAMELCASE: Avoid CamelCase: <RequirePhyMdiSwapPatch>
#761: FILE: drivers/net/r8169/r8169_hw.c:1205:
+ hw->RequirePhyMdiSwapPatch = TRUE;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppIntMitiVer>
#769: FILE: drivers/net/r8169/r8169_hw.c:1213:
+ hw->HwSuppIntMitiVer = 3;
CHECK:CAMELCASE: Avoid CamelCase: <MCUCmd_reg>
#814: FILE: drivers/net/r8169/r8169_hw.c:1258:
+ RTL_W8(hw, MCUCmd_reg, RTL_R8(hw, MCUCmd_reg) & ~Now_is_oob);
CHECK:CAMELCASE: Avoid CamelCase: <Now_is_oob>
#814: FILE: drivers/net/r8169/r8169_hw.c:1258:
+ RTL_W8(hw, MCUCmd_reg, RTL_R8(hw, MCUCmd_reg) & ~Now_is_oob);
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#823: FILE: drivers/net/r8169/r8169_hw.c:1267:
+ udelay(100);
ERROR:C99_COMMENTS: do not use C99 // comments
#836: FILE: drivers/net/r8169/r8169_hw.c:1280:
+ //if (HW_DASH_SUPPORT_DASH(hw)) {
ERROR:C99_COMMENTS: do not use C99 // comments
#837: FILE: drivers/net/r8169/r8169_hw.c:1281:
+ // rtl_driver_start(hw);
ERROR:C99_COMMENTS: do not use C99 // comments
#838: FILE: drivers/net/r8169/r8169_hw.c:1282:
+ // rtl_dash2_disable_txrx(hw);
ERROR:C99_COMMENTS: do not use C99 // comments
#839: FILE: drivers/net/r8169/r8169_hw.c:1283:
+ //}
CHECK:CAMELCASE: Avoid CamelCase: <TxConfig>
#930: FILE: drivers/net/r8169/r8169_hw.c:1374:
+ val32 = RTL_R32(hw, TxConfig);
CHECK:BRACES: braces {} should be used on all arms of this statement
#936: FILE: drivers/net/r8169/r8169_hw.c:1380:
+ if (ic_version_id == 0x00000000)
[...]
+ else if (ic_version_id == 0x100000)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#942: FILE: drivers/net/r8169/r8169_hw.c:1386:
+ else {
CHECK:BRACES: braces {} should be used on all arms of this statement
#950: FILE: drivers/net/r8169/r8169_hw.c:1394:
+ if (ic_version_id == 0x00000000)
[...]
+ else if (ic_version_id == 0x100000)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#956: FILE: drivers/net/r8169/r8169_hw.c:1400:
+ else {
CHECK:BRACES: braces {} should be used on all arms of this statement
#964: FILE: drivers/net/r8169/r8169_hw.c:1408:
+ if (ic_version_id == 0x00000000)
[...]
+ else if (ic_version_id == 0x100000)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#968: FILE: drivers/net/r8169/r8169_hw.c:1412:
+ else {
CHECK:BRACES: braces {} should be used on all arms of this statement
#976: FILE: drivers/net/r8169/r8169_hw.c:1420:
+ if (ic_version_id == 0x00000000)
[...]
+ else if (ic_version_id == 0x100000)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#980: FILE: drivers/net/r8169/r8169_hw.c:1424:
+ else {
CHECK:BRACES: braces {} should be used on all arms of this statement
#988: FILE: drivers/net/r8169/r8169_hw.c:1432:
+ if (ic_version_id == 0x00000000)
[...]
+ else if (ic_version_id == 0x100000)
[...]
+ else if (ic_version_id == 0x200000)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#994: FILE: drivers/net/r8169/r8169_hw.c:1438:
+ else {
ERROR:CODE_INDENT: code indent should use tabs where possible
#1044: FILE: drivers/net/r8169/r8169_hw.c:1488:
+^I ((uint32_t)addr[2] << 16) | ((uint32_t)addr[3] << 24));$
total: 24 errors, 8 warnings, 32 checks, 1032 lines checked
next prev parent reply other threads:[~2024-09-25 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240925075421.38142-1-howard_wang@realsil.com.cn>
2024-09-25 7:27 ` qemudev
2024-09-25 7:55 ` checkpatch [this message]
2024-09-25 14:28 ` dpdklab
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=20240925075510.E7CEB121D9E@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=howard_wang@realsil.com.cn \
--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).