Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vhost-vdpa: vhost_vdpa_alloc_domain() should be using a const struct bus_type *

The function, vhost_vdpa_alloc_domain(), has a pointer to a struct
bus_type, but it should be constant as the function it passes it to
expects it to be const, and the vhost code does not modify it in any
way.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: kvm@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: netdev@vger.kernel.org
Link: https://lore.kernel.org/r/20230313182918.1312597-31-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+1 -1
+1 -1
drivers/vhost/vdpa.c
··· 1140 1140 struct vdpa_device *vdpa = v->vdpa; 1141 1141 const struct vdpa_config_ops *ops = vdpa->config; 1142 1142 struct device *dma_dev = vdpa_get_dma_dev(vdpa); 1143 - struct bus_type *bus; 1143 + const struct bus_type *bus; 1144 1144 int ret; 1145 1145 1146 1146 /* Device want to do DMA by itself */