Skip to content

Commit

Permalink
virtio/vsock: simplify credit update function API
Browse files Browse the repository at this point in the history
This function is static and 'hdr' arg was always NULL.

Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arseny Krasnov authored and davem330 committed Jun 11, 2021
1 parent b93f887 commit c10844c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/vmw_vsock/virtio_transport_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit)
}
EXPORT_SYMBOL_GPL(virtio_transport_put_credit);

static int virtio_transport_send_credit_update(struct vsock_sock *vsk,
struct virtio_vsock_hdr *hdr)
static int virtio_transport_send_credit_update(struct vsock_sock *vsk)
{
struct virtio_vsock_pkt_info info = {
.op = VIRTIO_VSOCK_OP_CREDIT_UPDATE,
Expand Down Expand Up @@ -384,7 +383,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk,
* with different values.
*/
if (free_space < VIRTIO_VSOCK_MAX_PKT_BUF_SIZE)
virtio_transport_send_credit_update(vsk, NULL);
virtio_transport_send_credit_update(vsk);

return total;

Expand Down Expand Up @@ -493,7 +492,7 @@ void virtio_transport_notify_buffer_size(struct vsock_sock *vsk, u64 *val)

vvs->buf_alloc = *val;

virtio_transport_send_credit_update(vsk, NULL);
virtio_transport_send_credit_update(vsk);
}
EXPORT_SYMBOL_GPL(virtio_transport_notify_buffer_size);

Expand Down

0 comments on commit c10844c

Please sign in to comment.