DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/hns3: fix inaccurate error log
@ 2024-10-23  7:12 Jie Hai
  2024-10-30  2:31 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Jie Hai @ 2024-10-23  7:12 UTC (permalink / raw)
  To: dev, thomas, ferruh.yigit; +Cc: lihuisong, fengchengwen, haijie1, huangdengdui

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-30  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-23  7:12 [PATCH] net/hns3: fix inaccurate error log Jie Hai
2024-10-30  2:31 ` Ferruh Yigit

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).