From: Jie Hai <haijie1@huawei.com>
To: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>
Cc: <lihuisong@huawei.com>, <fengchengwen@huawei.com>,
<haijie1@huawei.com>, <huangdengdui@huawei.com>
Subject: [PATCH] net/hns3: fix inaccurate error log
Date: Wed, 23 Oct 2024 15:12:35 +0800 [thread overview]
Message-ID: <20241023071235.29672-1-haijie1@huawei.com> (raw)
If register number obtained from firmware is different from the
register list driver hold, an error log occurs. The incorrect
use of `&&` makes this log inaccurate, change it to `&`.
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index fef904a296c0..8a6ddbfe8ccd 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -897,7 +897,7 @@ hns3_get_name_by_module(enum hns3_reg_modules module)
size_t i;
for (i = 0; i < RTE_DIM(hns3_module_name_map); i++) {
- if (hns3_module_name_map[i].module && HNS3_MODULE_MASK(module) != 0)
+ if ((hns3_module_name_map[i].module & HNS3_MODULE_MASK(module)) != 0)
return hns3_module_name_map[i].name;
}
return "unknown";
--
2.22.0
reply other threads:[~2024-10-23 7:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20241023071235.29672-1-haijie1@huawei.com \
--to=haijie1@huawei.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=huangdengdui@huawei.com \
--cc=lihuisong@huawei.com \
--cc=thomas@monjalon.net \
/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).