summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2021-02-13 20:39:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2021-03-14 04:37:36 -0400
commitaa443ac20445ad79afc9aa589727e5d9ee88dc2f (patch)
treea647ab23d2aaa0658c307d10149c18a08c1f1aae
parentbc22ed2ea1121f9d9ba3f85c524cb857d54a2d00 (diff)
vdpa_sim: Skip typecasting from void*
Typecasting from void* to virtio_net_config* is not needed. Remove it. Signed-off-by: Parav Pandit <parav@nvidia.com> Link: https://lore.kernel.org/r/20210213183951.248324-1-parav@nvidia.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--drivers/vdpa/vdpa_sim/vdpa_sim_net.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
index 702be74877d2..a1ab6163f7d1 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
@@ -110,8 +110,7 @@ out:
static void vdpasim_net_get_config(struct vdpasim *vdpasim, void *config)
{
- struct virtio_net_config *net_config =
- (struct virtio_net_config *)config;
+ struct virtio_net_config *net_config = config;
net_config->mtu = cpu_to_vdpasim16(vdpasim, 1500);
net_config->status = cpu_to_vdpasim16(vdpasim, VIRTIO_NET_S_LINK_UP);