]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
vsock/virtio: remove unnecessary call to `virtio_transport_get_ops`
authorLuigi Leonardi <leonardi@redhat.com>
Wed, 8 Apr 2026 15:21:02 +0000 (17:21 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 12 Apr 2026 16:57:01 +0000 (09:57 -0700)
`virtio_transport_send_pkt_info` gets all the transport information
from the parameter `t_ops`. There is no need to call
`virtio_transport_get_ops()`.

Remove it.

Acked-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://patch.msgid.link/20260408-remove_parameter-v2-1-e00f31cf7a17@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/vmw_vsock/virtio_transport_common.c

index 8a9fb23c6e853dfea0a24d3787f7d6eb351dd6c6..a152a9e208d0944f0d02fbed9dd2d863357350d0 100644 (file)
@@ -60,8 +60,6 @@ static bool virtio_transport_can_zcopy(const struct virtio_transport *t_ops,
                return false;
 
        /* Check that transport can send data in zerocopy mode. */
-       t_ops = virtio_transport_get_ops(info->vsk);
-
        if (t_ops->can_msgzerocopy) {
                int pages_to_send = iov_iter_npages(iov_iter, MAX_SKB_FRAGS);