[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220929014555.112323-6-lingshan.zhu@intel.com>
Date: Thu, 29 Sep 2022 09:45:54 +0800
From: Zhu Lingshan <lingshan.zhu@...el.com>
To: jasowang@...hat.com, mst@...hat.com
Cc: virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
kvm@...r.kernel.org, Zhu Lingshan <lingshan.zhu@...el.com>
Subject: [PATCH V3 5/6] vDPA: fix spars cast warning in vdpa_dev_net_mq_config_fill
This commit fixes spars warnings: cast to restricted __le16
in function vdpa_dev_net_mq_config_fill()
Signed-off-by: Zhu Lingshan <lingshan.zhu@...el.com>
Acked-by: Jason Wang <jasowang@...hat.com>
---
drivers/vdpa/vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index 4b13bb7f355d..f10403c86af7 100644
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -808,7 +808,8 @@ static int vdpa_dev_net_mq_config_fill(struct sk_buff *msg, u64 features,
(features & BIT_ULL(VIRTIO_NET_F_RSS)) == 0)
return 0;
- val_u16 = le16_to_cpu(config->max_virtqueue_pairs);
+ val_u16 = __virtio16_to_cpu(true, config->max_virtqueue_pairs);
+
return nla_put_u16(msg, VDPA_ATTR_DEV_NET_CFG_MAX_VQP, val_u16);
}
--
2.31.1
Powered by blists - more mailing lists