From: Jijie Shao <shaojijie@huawei.com>
To: Simon Horman <horms@kernel.org>
Cc: <shaojijie@huawei.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<andrew+netdev@lunn.ch>, <shenjian15@huawei.com>,
<wangpeiyang1@huawei.com>, <liuyonglong@huawei.com>,
<chenhao418@huawei.com>, <jonathan.cameron@huawei.com>,
<shameerali.kolothum.thodi@huawei.com>, <salil.mehta@huawei.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<michal.swiatkowski@linux.intel.com>
Subject: Re: [PATCH V2 net-next 8/8] net: hns3: clear hns alarm: comparison of integer expressions of different signedness
Date: Thu, 19 Jun 2025 19:59:07 +0800 [thread overview]
Message-ID: <5a23d321-307a-4f4a-a2cf-9c8dcf001dbb@huawei.com> (raw)
In-Reply-To: <20250618112924.GL1699@horms.kernel.org>
on 2025/6/18 19:29, Simon Horman wrote:
> On Tue, Jun 17, 2025 at 09:02:55AM +0800, Jijie Shao wrote:
>> From: Peiyang Wang <wangpeiyang1@huawei.com>
>>
>> A static alarm exists in the hns and needs to be cleared.
> I'm curious to know if you used a tool to flag this.
Sorry, the last reply was not cc to netdev...
Some internal tools, and then there are the compiler options, such as -Wsign-compare.
>
>> The alarm is comparison of integer expressions of different
>> signedness including 's64' and 'long unsigned int',
>> 'int' and 'long unsigned int', 'u32' and 'int',
>> 'int' and 'unsigned int'.
>>
>> Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
>> Signed-off-by: Jijie Shao <shaojijie@huawei.com>
>> ---
>> .../hns3/hns3_common/hclge_comm_cmd.c | 2 +-
>> .../net/ethernet/hisilicon/hns3/hns3_enet.c | 22 +++++++-------
>> .../net/ethernet/hisilicon/hns3/hns3_enet.h | 2 +-
>> .../ethernet/hisilicon/hns3/hns3_ethtool.c | 4 +--
>> .../hisilicon/hns3/hns3pf/hclge_debugfs.c | 13 ++++----
>> .../hisilicon/hns3/hns3pf/hclge_main.c | 30 +++++++++----------
>> .../hisilicon/hns3/hns3pf/hclge_mbx.c | 7 +++--
>> .../hisilicon/hns3/hns3pf/hclge_mdio.c | 2 +-
>> .../hisilicon/hns3/hns3pf/hclge_ptp.h | 2 +-
>> .../hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +-
>> .../hisilicon/hns3/hns3vf/hclgevf_mbx.c | 2 +-
>> 11 files changed, 44 insertions(+), 44 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
>> index 4ad4e8ab2f1f..37396ca4ecfc 100644
>> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
>> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c
>> @@ -348,7 +348,7 @@ static int hclge_comm_cmd_csq_clean(struct hclge_comm_hw *hw)
>> static int hclge_comm_cmd_csq_done(struct hclge_comm_hw *hw)
>> {
>> u32 head = hclge_comm_read_dev(hw, HCLGE_COMM_NIC_CSQ_HEAD_REG);
>> - return head == hw->cmq.csq.next_to_use;
>> + return head == (u32)hw->cmq.csq.next_to_use;
> Can the type of next_to_use be changed to an unsigned type?
> It would be nice to avoid casts.
Today I plan to modify the next_to_use type,
but I found that if next_to_use is changed to u32,
it will cause many other places to need to synchronously change the variable type.
At a glance, there are dozens of places.
Therefore, I am considering whether this part can remain unchanged.
Thanks
Jijie Shao
next prev parent reply other threads:[~2025-06-19 11:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 1:02 [PATCH V2 net-next 0/8] There are some cleanup for hns3 driver Jijie Shao
2025-06-17 1:02 ` [PATCH V2 net-next 1/8] net: hns3: fix spelling mistake "reg_um" -> "reg_num" Jijie Shao
2025-06-18 10:55 ` Simon Horman
2025-06-17 1:02 ` [PATCH V2 net-next 2/8] net: hns3: use hns3_get_ae_dev() helper to reduce the unnecessary middle layer conversion Jijie Shao
2025-06-17 14:15 ` Michal Swiatkowski
2025-06-17 1:02 ` [PATCH V2 net-next 3/8] net: hns3: use hns3_get_ops() " Jijie Shao
2025-06-17 14:12 ` Michal Swiatkowski
2025-06-17 1:02 ` [PATCH V2 net-next 4/8] net: hns3: add \n at the end when print msg Jijie Shao
2025-06-18 10:57 ` Simon Horman
2025-06-17 1:02 ` [PATCH V2 net-next 5/8] net: hns3: set the freed pointers to NULL when lifetime is not end Jijie Shao
2025-06-18 11:12 ` Simon Horman
2025-06-18 13:44 ` Jijie Shao
2025-06-17 1:02 ` [PATCH V2 net-next 6/8] net: hns3: delete redundant address before the array Jijie Shao
2025-06-18 11:20 ` Simon Horman
2025-06-17 1:02 ` [PATCH V2 net-next 7/8] net: hns3: add complete parentheses for some macros Jijie Shao
2025-06-18 11:21 ` Simon Horman
2025-06-17 1:02 ` [PATCH V2 net-next 8/8] net: hns3: clear hns alarm: comparison of integer expressions of different signedness Jijie Shao
2025-06-18 11:29 ` Simon Horman
2025-06-19 11:59 ` Jijie Shao [this message]
2025-06-19 12:54 ` Simon Horman
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=5a23d321-307a-4f4a-a2cf-9c8dcf001dbb@huawei.com \
--to=shaojijie@huawei.com \
--cc=andrew+netdev@lunn.ch \
--cc=chenhao418@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jonathan.cameron@huawei.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shenjian15@huawei.com \
--cc=wangpeiyang1@huawei.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
all inboxes | Powered by JetHome®