[PATCH 2/2] net/xsc: suppress assign the same value warning

Renyong Wan wanry at yunsilicon.com
Tue Feb 25 03:48:15 CET 2025


This issue was reported by PVS studio, described as:
https://pvs-studio.com/en/docs/warnings/v1048/

This warning is harmless since both structs have the same size.
The tool is just being annoying, so we should suppress it.

Signed-off-by: Rong Qian <qianr at yunsilicon.com>
Signed-off-by: Renyong Wan <wanry at yunsilicon.com>
---
 drivers/net/xsc/xsc_vfio_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xsc/xsc_vfio_mbox.c b/drivers/net/xsc/xsc_vfio_mbox.c
index c465679527..3c8bb54601 100644
--- a/drivers/net/xsc/xsc_vfio_mbox.c
+++ b/drivers/net/xsc/xsc_vfio_mbox.c
@@ -572,7 +572,7 @@ xsc_vfio_mbox_init(struct xsc_dev *xdev)
 	cmdq->req_lay = cmdq->req_mz->addr;
 
 	snprintf(name, RTE_MEMZONE_NAMESIZE, "%s_cmd_cq", xdev->pci_dev->device.name);
-	size = (1 << XSC_CMDQ_DEPTH_LOG) * sizeof(struct xsc_cmdq_rsp_layout);
+	size = (1 << XSC_CMDQ_DEPTH_LOG) * sizeof(struct xsc_cmdq_rsp_layout); /* -V1048 */
 	cmdq->rsp_mz = rte_memzone_reserve_aligned(name,
 						   size, SOCKET_ID_ANY,
 						   RTE_MEMZONE_IOVA_CONTIG,
-- 
2.25.1


More information about the dev mailing list