* |WARNING| pw144405 [PATCH] net/r8169: add support for hw config
[not found] <20240924074549.6788-1-howard_wang@realsil.com.cn>
2024-09-24 7:18 ` |WARNING| pw144405 [PATCH] net/r8169: add support for hw config qemudev
@ 2024-09-24 7:47 ` checkpatch
2024-09-24 14:50 ` dpdklab
2 siblings, 0 replies; 3+ messages in thread
From: checkpatch @ 2024-09-24 7:47 UTC (permalink / raw)
To: test-report; +Cc: Howard Wang
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/144405
_coding style issues_
CHECK:CAMELCASE: Avoid CamelCase: <InterFrameGap>
#237: FILE: drivers/net/r8169/r8169_base.h:515:
+#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppIntMitiVer>
#268: FILE: drivers/net/r8169/r8169_ethdev.h:20:
+ u8 HwSuppIntMitiVer;
CHECK:CAMELCASE: Avoid CamelCase: <EnableTxNoClose>
#271: FILE: drivers/net/r8169/r8169_ethdev.h:23:
+ u8 EnableTxNoClose;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppDashVer>
#274: FILE: drivers/net/r8169/r8169_ethdev.h:26:
+ u8 HwSuppDashVer;
CHECK:CAMELCASE: Avoid CamelCase: <HwSuppOcpChannelVer>
#276: FILE: drivers/net/r8169/r8169_ethdev.h:28:
+ u8 HwSuppOcpChannelVer;
CHECK:CAMELCASE: Avoid CamelCase: <AllowAccessDashOcp>
#277: FILE: drivers/net/r8169/r8169_ethdev.h:29:
+ u8 AllowAccessDashOcp;
ERROR:CODE_INDENT: code indent should use tabs where possible
#291: FILE: drivers/net/r8169/r8169_hw.c:19:
+ int type, const u32 base_address)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#291: FILE: drivers/net/r8169/r8169_hw.c:19:
+ int type, const u32 base_address)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#298: FILE: drivers/net/r8169/r8169_hw.c:26:
+^I (base_address & 0x000FFF);$
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_Addr_Align>
#304: FILE: drivers/net/r8169/r8169_hw.c:32:
+ val_shift = addr % ERIAR_Addr_Align;
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_Read>
#307: FILE: drivers/net/r8169/r8169_hw.c:35:
+ eri_cmd = ERIAR_Read | transformed_base_address |
ERROR:CODE_INDENT: code indent should use tabs where possible
#308: FILE: drivers/net/r8169/r8169_hw.c:36:
+^I^I type << ERIAR_Type_shift |$
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_Type_shift>
#308: FILE: drivers/net/r8169/r8169_hw.c:36:
+ type << ERIAR_Type_shift |
ERROR:CODE_INDENT: code indent should use tabs where possible
#309: FILE: drivers/net/r8169/r8169_hw.c:37:
+^I^I ERIAR_ByteEn << ERIAR_ByteEn_shift |$
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_ByteEn>
#309: FILE: drivers/net/r8169/r8169_hw.c:37:
+ ERIAR_ByteEn << ERIAR_ByteEn_shift |
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_ByteEn_shift>
#309: FILE: drivers/net/r8169/r8169_hw.c:37:
+ ERIAR_ByteEn << ERIAR_ByteEn_shift |
ERROR:CODE_INDENT: code indent should use tabs where possible
#310: FILE: drivers/net/r8169/r8169_hw.c:38:
+^I^I (addr & 0x0FFF);$
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_Flag>
#323: FILE: drivers/net/r8169/r8169_hw.c:51:
+ if (RTL_R32(hw, ERIAR) & ERIAR_Flag)
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#327: FILE: drivers/net/r8169/r8169_hw.c:55:
+ if (len == 1) mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#328: FILE: drivers/net/r8169/r8169_hw.c:56:
+ else if (len == 2) mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#329: FILE: drivers/net/r8169/r8169_hw.c:57:
+ else if (len == 3) mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#330: FILE: drivers/net/r8169/r8169_hw.c:58:
+ else mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
CHECK:BRACES: braces {} should be used on all arms of this statement
#335: FILE: drivers/net/r8169/r8169_hw.c:63:
+ if (len <= 4 - val_shift)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#337: FILE: drivers/net/r8169/r8169_hw.c:65:
+ else {
ERROR:CODE_INDENT: code indent should use tabs where possible
#351: FILE: drivers/net/r8169/r8169_hw.c:79:
+ int len, u32 value, int type, const u32 base_address)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#351: FILE: drivers/net/r8169/r8169_hw.c:79:
+ int len, u32 value, int type, const u32 base_address)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#357: FILE: drivers/net/r8169/r8169_hw.c:85:
+^I (base_address & 0x000FFF);$
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#366: FILE: drivers/net/r8169/r8169_hw.c:94:
+ if (len == 1) mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#367: FILE: drivers/net/r8169/r8169_hw.c:95:
+ else if (len == 2) mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#368: FILE: drivers/net/r8169/r8169_hw.c:96:
+ else if (len == 3) mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#369: FILE: drivers/net/r8169/r8169_hw.c:97:
+ else mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
ERROR:CODE_INDENT: code indent should use tabs where possible
#372: FILE: drivers/net/r8169/r8169_hw.c:100:
+^I^I base_address) & ~mask;$
CHECK:CAMELCASE: Avoid CamelCase: <ERIAR_Write>
#377: FILE: drivers/net/r8169/r8169_hw.c:105:
+ eri_cmd = ERIAR_Write | transformed_base_address |
ERROR:CODE_INDENT: code indent should use tabs where possible
#378: FILE: drivers/net/r8169/r8169_hw.c:106:
+^I^I type << ERIAR_Type_shift |$
ERROR:CODE_INDENT: code indent should use tabs where possible
#379: FILE: drivers/net/r8169/r8169_hw.c:107:
+^I^I ERIAR_ByteEn << ERIAR_ByteEn_shift |$
ERROR:CODE_INDENT: code indent should use tabs where possible
#380: FILE: drivers/net/r8169/r8169_hw.c:108:
+^I^I (addr & 0x0FFF);$
CHECK:BRACES: braces {} should be used on all arms of this statement
#397: FILE: drivers/net/r8169/r8169_hw.c:125:
+ if (len <= 4 - val_shift)
[...]
+ else {
[...]
CHECK:BRACES: Unbalanced braces around else statement
#399: FILE: drivers/net/r8169/r8169_hw.c:127:
+ else {
ERROR:CODE_INDENT: code indent should use tabs where possible
#413: FILE: drivers/net/r8169/r8169_hw.c:141:
+ const u32 base_address)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#413: FILE: drivers/net/r8169/r8169_hw.c:141:
+ const u32 base_address)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#416: FILE: drivers/net/r8169/r8169_hw.c:144:
+^I base_address);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#435: FILE: drivers/net/r8169/r8169_hw.c:163:
+ u32 value, const u32 base_address)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#435: FILE: drivers/net/r8169/r8169_hw.c:163:
+ u32 value, const u32 base_address)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#438: FILE: drivers/net/r8169/r8169_hw.c:166:
+^I base_address);$
CHECK:BRACES: Blank lines aren't necessary before a close brace '}'
#496: FILE: drivers/net/r8169/r8169_hw.c:224:
+
+ }
CHECK:CAMELCASE: Avoid CamelCase: <ChipCmd>
#565: FILE: drivers/net/r8169/r8169_hw.c:364:
+ RTL_W8(hw, ChipCmd, RTL_R8(hw, ChipCmd) | StopReq);
CHECK:CAMELCASE: Avoid CamelCase: <StopReq>
#565: FILE: drivers/net/r8169/r8169_hw.c:364:
+ RTL_W8(hw, ChipCmd, RTL_R8(hw, ChipCmd) | StopReq);
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#572: FILE: drivers/net/r8169/r8169_hw.c:371:
+ udelay(10);
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#579: FILE: drivers/net/r8169/r8169_hw.c:378:
+ udelay(200);
CHECK:CAMELCASE: Avoid CamelCase: <CmdTxEnb>
#583: FILE: drivers/net/r8169/r8169_hw.c:382:
+ RTL_W8(hw, ChipCmd, RTL_R8(hw, ChipCmd) & (CmdTxEnb | CmdRxEnb));
CHECK:CAMELCASE: Avoid CamelCase: <CmdRxEnb>
#583: FILE: drivers/net/r8169/r8169_hw.c:382:
+ RTL_W8(hw, ChipCmd, RTL_R8(hw, ChipCmd) & (CmdTxEnb | CmdRxEnb));
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#594: FILE: drivers/net/r8169/r8169_hw.c:393:
+ udelay(50);
CHECK:CAMELCASE: Avoid CamelCase: <MCUCmd_reg>
#595: FILE: drivers/net/r8169/r8169_hw.c:394:
+ if ((RTL_R8(hw, MCUCmd_reg) & (Txfifo_empty | Rxfifo_empty)) ==
CHECK:CAMELCASE: Avoid CamelCase: <Txfifo_empty>
#595: FILE: drivers/net/r8169/r8169_hw.c:394:
+ if ((RTL_R8(hw, MCUCmd_reg) & (Txfifo_empty | Rxfifo_empty)) ==
CHECK:CAMELCASE: Avoid CamelCase: <Rxfifo_empty>
#595: FILE: drivers/net/r8169/r8169_hw.c:394:
+ if ((RTL_R8(hw, MCUCmd_reg) & (Txfifo_empty | Rxfifo_empty)) ==
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#608: FILE: drivers/net/r8169/r8169_hw.c:407:
+ udelay(50);
CHECK:CAMELCASE: Avoid CamelCase: <IntrMitigate>
#609: FILE: drivers/net/r8169/r8169_hw.c:408:
+ if ((RTL_R16(hw, IntrMitigate) & (BIT_0 | BIT_1 | BIT_8)) ==
CHECK:CAMELCASE: Avoid CamelCase: <RxConfig>
#620: FILE: drivers/net/r8169/r8169_hw.c:419:
+ RTL_W32(hw, RxConfig, RTL_R32(hw, RxConfig) &
ERROR:CODE_INDENT: code indent should use tabs where possible
#621: FILE: drivers/net/r8169/r8169_hw.c:420:
+^I ~(AcceptErr | AcceptRunt | AcceptBroadcast | AcceptMulticast |$
CHECK:CAMELCASE: Avoid CamelCase: <AcceptErr>
#621: FILE: drivers/net/r8169/r8169_hw.c:420:
+ ~(AcceptErr | AcceptRunt | AcceptBroadcast | AcceptMulticast |
CHECK:CAMELCASE: Avoid CamelCase: <AcceptRunt>
#621: FILE: drivers/net/r8169/r8169_hw.c:420:
+ ~(AcceptErr | AcceptRunt | AcceptBroadcast | AcceptMulticast |
CHECK:CAMELCASE: Avoid CamelCase: <AcceptBroadcast>
#621: FILE: drivers/net/r8169/r8169_hw.c:420:
+ ~(AcceptErr | AcceptRunt | AcceptBroadcast | AcceptMulticast |
CHECK:CAMELCASE: Avoid CamelCase: <AcceptMulticast>
#621: FILE: drivers/net/r8169/r8169_hw.c:420:
+ ~(AcceptErr | AcceptRunt | AcceptBroadcast | AcceptMulticast |
ERROR:CODE_INDENT: code indent should use tabs where possible
#622: FILE: drivers/net/r8169/r8169_hw.c:421:
+^I AcceptMyPhys | AcceptAllPhys));$
CHECK:CAMELCASE: Avoid CamelCase: <AcceptMyPhys>
#622: FILE: drivers/net/r8169/r8169_hw.c:421:
+ AcceptMyPhys | AcceptAllPhys));
CHECK:CAMELCASE: Avoid CamelCase: <AcceptAllPhys>
#622: FILE: drivers/net/r8169/r8169_hw.c:421:
+ AcceptMyPhys | AcceptAllPhys));
CHECK:CAMELCASE: Avoid CamelCase: <CmdReset>
#641: FILE: drivers/net/r8169/r8169_hw.c:440:
+ RTL_W8(hw, ChipCmd, CmdReset);
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#645: FILE: drivers/net/r8169/r8169_hw.c:444:
+ udelay(100);
CHECK:CAMELCASE: Avoid CamelCase: <Cfg9346>
#654: FILE: drivers/net/r8169/r8169_hw.c:453:
+ RTL_W8(hw, Cfg9346, RTL_R8(hw, Cfg9346) | Cfg9346_Unlock);
CHECK:CAMELCASE: Avoid CamelCase: <Cfg9346_Unlock>
#654: FILE: drivers/net/r8169/r8169_hw.c:453:
+ RTL_W8(hw, Cfg9346, RTL_R8(hw, Cfg9346) | Cfg9346_Unlock);
CHECK:CAMELCASE: Avoid CamelCase: <Config2>
#680: FILE: drivers/net/r8169/r8169_hw.c:479:
+ RTL_W8(hw, Config2, RTL_R8(hw, Config2) | BIT_7);
CHECK:CAMELCASE: Avoid CamelCase: <Config5>
#681: FILE: drivers/net/r8169/r8169_hw.c:480:
+ RTL_W8(hw, Config5, RTL_R8(hw, Config5) | BIT_0);
ERROR:CODE_INDENT: code indent should use tabs where possible
#758: FILE: drivers/net/r8169/r8169_hw.c:557:
+^I^I^I INT_CFG0_MITIGATION_BYPASS_8125 |$
ERROR:CODE_INDENT: code indent should use tabs where possible
#759: FILE: drivers/net/r8169/r8169_hw.c:558:
+^I^I^I INT_CFG0_RDU_BYPASS_8126));$
CHECK:CAMELCASE: Avoid CamelCase: <RxCfgDMAShift>
#775: FILE: drivers/net/r8169/r8169_hw.c:574:
+ RTL_W32(hw, RxConfig, (RX_DMA_BURST_unlimited << RxCfgDMAShift));
CHECK:CAMELCASE: Avoid CamelCase: <TxConfig>
#800: FILE: drivers/net/r8169/r8169_hw.c:599:
+ RTL_W32(hw, TxConfig, (TX_DMA_BURST_unlimited << TxDMAShift) |
CHECK:CAMELCASE: Avoid CamelCase: <TxDMAShift>
#800: FILE: drivers/net/r8169/r8169_hw.c:599:
+ RTL_W32(hw, TxConfig, (TX_DMA_BURST_unlimited << TxDMAShift) |
ERROR:CODE_INDENT: code indent should use tabs where possible
#801: FILE: drivers/net/r8169/r8169_hw.c:600:
+^I (InterFrameGap << TxInterFrameGapShift));$
CHECK:CAMELCASE: Avoid CamelCase: <TxInterFrameGapShift>
#801: FILE: drivers/net/r8169/r8169_hw.c:600:
+ (InterFrameGap << TxInterFrameGapShift));
CHECK:CAMELCASE: Avoid CamelCase: <Config1>
#830: FILE: drivers/net/r8169/r8169_hw.c:629:
+ RTL_W8(hw, Config1, RTL_R8(hw, Config1) & ~0x10);
ERROR:CODE_INDENT: code indent should use tabs where possible
#857: FILE: drivers/net/r8169/r8169_hw.c:656:
+^I^I hw->mcfg == CFG_METHOD_71)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#887: FILE: drivers/net/r8169/r8169_hw.c:686:
+^I^I BIT_0);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#941: FILE: drivers/net/r8169/r8169_hw.c:740:
+^I^I (BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12));$
ERROR:CODE_INDENT: code indent should use tabs where possible
#945: FILE: drivers/net/r8169/r8169_hw.c:744:
+^I^I BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);$
CHECK:CAMELCASE: Avoid CamelCase: <EnableRxDescV4_0>
#975: FILE: drivers/net/r8169/r8169_hw.c:774:
+ RTL_W8(hw, 0xd8, RTL_R8(hw, 0xd8) & ~EnableRxDescV4_0);
CHECK:USLEEP_RANGE: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#994: FILE: drivers/net/r8169/r8169_hw.c:793:
+ udelay(10);
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1039: FILE: drivers/net/r8169/r8169_phy.c:2:
+ * Copyright(c) 2024 Realtek Corporation. All rights reserved */
WARNING:TYPO_SPELLING: 'stdio' may be misspelled - perhaps 'studio'?
#1042: FILE: drivers/net/r8169/r8169_phy.c:5:
+#include <stdio.h>
ERROR:CODE_INDENT: code indent should use tabs where possible
#1057: FILE: drivers/net/r8169/r8169_phy.c:20:
+ u16 setmask)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#1057: FILE: drivers/net/r8169/r8169_phy.c:20:
+ u16 setmask)$
total: 33 errors, 7 warnings, 50 checks, 980 lines checked
^ permalink raw reply [flat|nested] 3+ messages in thread