From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Howard Wang <howard_wang@realsil.com.cn>, dev@dpdk.org
Cc: pro_nic_dpdk@realtek.com
Subject: Re: [PATCH v7 07/17] net/r8169: add support for hardware operations
Date: Tue, 12 Nov 2024 23:38:29 +0000 [thread overview]
Message-ID: <150e064f-121f-4488-a67a-4307d847d154@amd.com> (raw)
In-Reply-To: <20241112095804.42091-8-howard_wang@realsil.com.cn>
On 11/12/2024 9:57 AM, Howard Wang wrote:
> +
> +#define TRUE 1
> +#define FALSE 0
>
Also checkpatch has BOOL_COMPARISON warnings [1], technically
"(hw->NotWrMcuPatchCode == TRUE)" can be "(hw->NotWrMcuPatchCode)"
they are same.
As you are defining TRUE & FALSE as above (since this is compatibility
header, I understand the reason of defining them), check can be
misleading, consider following case:
hw->NotWrMcuPatchCode = FALSE;
hw->NotWrMcuPatchCode += 3;
if (hw->NotWrMcuPatchCode == TRUE) // The result is unexpected
This is not hard requirement, except from checkpatch warning, but can
you please double check?
[1]
CHECK:BOOL_COMPARISON: Using comparison to TRUE is error prone
#396: FILE: drivers/net/r8169/base/rtl8125a.c:380:
+ if (hw->NotWrMcuPatchCode == TRUE)
CHECK:BOOL_COMPARISON: Using comparison to TRUE is error prone
#2403: FILE: drivers/net/r8169/base/rtl8125b.c:358:
+ if (hw->NotWrMcuPatchCode == TRUE)
CHECK:BOOL_COMPARISON: Using comparison to TRUE is error prone
#3617: FILE: drivers/net/r8169/base/rtl8125bp.c:83:
+ if (hw->NotWrMcuPatchCode == TRUE)
CHECK:BOOL_COMPARISON: Using comparison to TRUE is error prone
#4180: FILE: drivers/net/r8169/base/rtl8125d.c:212:
+ if (hw->NotWrMcuPatchCode == TRUE)
CHECK:BOOL_COMPARISON: Using comparison to TRUE is error prone
#5355: FILE: drivers/net/r8169/base/rtl8126a.c:495:
+ if (hw->NotWrMcuPatchCode == TRUE)
next prev parent reply other threads:[~2024-11-12 23:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 9:57 [PATCH v7 00/17] modify code as suggested by the maintainer Howard Wang
2024-11-12 9:57 ` [PATCH v7 01/17] net/r8169: add PMD driver skeleton Howard Wang
2024-11-12 16:44 ` Stephen Hemminger
2024-11-12 23:55 ` Ferruh Yigit
2024-11-12 9:57 ` [PATCH v7 02/17] net/r8169: add logging structure Howard Wang
2024-11-12 23:07 ` Ferruh Yigit
2024-11-12 9:57 ` [PATCH v7 03/17] net/r8169: add hardware registers access routines Howard Wang
2024-11-12 9:57 ` [PATCH v7 04/17] net/r8169: implement core logic for Tx/Rx Howard Wang
2024-11-12 9:57 ` [PATCH v7 05/17] net/r8169: add support for HW config Howard Wang
2024-11-12 9:57 ` [PATCH v7 06/17] net/r8169: add PHY registers access routines Howard Wang
2024-11-12 9:57 ` [PATCH v7 07/17] net/r8169: add support for hardware operations Howard Wang
2024-11-12 23:38 ` Ferruh Yigit [this message]
2024-11-12 9:57 ` [PATCH v7 08/17] net/r8169: add support for PHY configuration Howard Wang
2024-11-12 23:40 ` Ferruh Yigit
2024-11-12 9:57 ` [PATCH v7 09/17] net/r8169: add support for HW initialization Howard Wang
2024-11-12 9:57 ` [PATCH v7 10/17] net/r8169: add link status and interrupt management Howard Wang
2024-11-12 9:57 ` [PATCH v7 11/17] net/r8169: implement Rx path Howard Wang
2024-11-13 0:04 ` Ferruh Yigit
2024-11-12 9:57 ` [PATCH v7 12/17] net/r8169: implement Tx path Howard Wang
2024-11-12 9:58 ` [PATCH v7 13/17] net/r8169: implement device statistics Howard Wang
2024-11-12 9:58 ` [PATCH v7 14/17] net/r8169: implement promisc and allmulti modes Howard Wang
2024-11-13 0:08 ` Ferruh Yigit
2024-11-12 9:58 ` [PATCH v7 15/17] net/r8169: implement MTU configuration Howard Wang
2024-11-12 9:58 ` [PATCH v7 16/17] net/r8169: add support for getting FW version Howard Wang
2024-11-12 9:58 ` [PATCH v7 17/17] net/r8169: add driver start and driver stop Howard Wang
2024-11-13 0:22 ` [PATCH v7 00/17] modify code as suggested by the maintainer Ferruh Yigit
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=150e064f-121f-4488-a67a-4307d847d154@amd.com \
--to=ferruh.yigit@amd.com \
--cc=dev@dpdk.org \
--cc=howard_wang@realsil.com.cn \
--cc=pro_nic_dpdk@realtek.com \
/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).