Skip to content

Commit 9993a4f

Browse files
committed
virtio: Revert "virtio: find_vqs() add arg sizes"
This reverts commit a10fba0: the proposed API isn't supported on all transports but no effort was made to address this. It might not be hard to fix if we want to: maybe just rename size to size_hint and make sure legacy transports ignore the hint. But it's not sure what the benefit is in any case, so let's drop it. Fixes: a10fba0 ("virtio: find_vqs() add arg sizes") Signed-off-by: Michael S. Tsirkin <[email protected]> Message-Id: <[email protected]>
1 parent 9e82eb5 commit 9993a4f

File tree

10 files changed

+10
-22
lines changed

10 files changed

+10
-22
lines changed

arch/um/drivers/virtio_uml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ static struct virtqueue *vu_setup_vq(struct virtio_device *vdev,
10111011

10121012
static int vu_find_vqs(struct virtio_device *vdev, unsigned nvqs,
10131013
struct virtqueue *vqs[], vq_callback_t *callbacks[],
1014-
const char * const names[], u32 sizes[], const bool *ctx,
1014+
const char * const names[], const bool *ctx,
10151015
struct irq_affinity *desc)
10161016
{
10171017
struct virtio_uml_device *vu_dev = to_virtio_uml_device(vdev);

drivers/platform/mellanox/mlxbf-tmfifo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,6 @@ static int mlxbf_tmfifo_virtio_find_vqs(struct virtio_device *vdev,
928928
struct virtqueue *vqs[],
929929
vq_callback_t *callbacks[],
930930
const char * const names[],
931-
u32 sizes[],
932931
const bool *ctx,
933932
struct irq_affinity *desc)
934933
{

drivers/remoteproc/remoteproc_virtio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ static int rproc_virtio_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
158158
struct virtqueue *vqs[],
159159
vq_callback_t *callbacks[],
160160
const char * const names[],
161-
u32 sizes[],
162161
const bool * ctx,
163162
struct irq_affinity *desc)
164163
{

drivers/s390/virtio/virtio_ccw.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,
637637
struct virtqueue *vqs[],
638638
vq_callback_t *callbacks[],
639639
const char * const names[],
640-
u32 sizes[],
641640
const bool *ctx,
642641
struct irq_affinity *desc)
643642
{

drivers/virtio/virtio_mmio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
474474
struct virtqueue *vqs[],
475475
vq_callback_t *callbacks[],
476476
const char * const names[],
477-
u32 sizes[],
478477
const bool *ctx,
479478
struct irq_affinity *desc)
480479
{

drivers/virtio/virtio_pci_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int vp_find_vqs_intx(struct virtio_device *vdev, unsigned int nvqs,
396396
/* the config->find_vqs() implementation */
397397
int vp_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
398398
struct virtqueue *vqs[], vq_callback_t *callbacks[],
399-
const char * const names[], u32 sizes[], const bool *ctx,
399+
const char * const names[], const bool *ctx,
400400
struct irq_affinity *desc)
401401
{
402402
int err;

drivers/virtio/virtio_pci_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void vp_del_vqs(struct virtio_device *vdev);
110110
/* the config->find_vqs() implementation */
111111
int vp_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
112112
struct virtqueue *vqs[], vq_callback_t *callbacks[],
113-
const char * const names[], u32 sizes[], const bool *ctx,
113+
const char * const names[], const bool *ctx,
114114
struct irq_affinity *desc);
115115
const char *vp_bus_name(struct virtio_device *vdev);
116116

drivers/virtio/virtio_pci_modern.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,12 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
347347
static int vp_modern_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
348348
struct virtqueue *vqs[],
349349
vq_callback_t *callbacks[],
350-
const char * const names[],
351-
u32 sizes[],
352-
const bool *ctx,
350+
const char * const names[], const bool *ctx,
353351
struct irq_affinity *desc)
354352
{
355353
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
356354
struct virtqueue *vq;
357-
int rc = vp_find_vqs(vdev, nvqs, vqs, callbacks, names, sizes, ctx,
358-
desc);
355+
int rc = vp_find_vqs(vdev, nvqs, vqs, callbacks, names, ctx, desc);
359356

360357
if (rc)
361358
return rc;

drivers/virtio/virtio_vdpa.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ static int virtio_vdpa_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
269269
struct virtqueue *vqs[],
270270
vq_callback_t *callbacks[],
271271
const char * const names[],
272-
u32 sizes[],
273272
const bool *ctx,
274273
struct irq_affinity *desc)
275274
{

include/linux/virtio_config.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ struct virtio_shm_region {
5555
* include a NULL entry for vqs that do not need a callback
5656
* names: array of virtqueue names (mainly for debugging)
5757
* include a NULL entry for vqs unused by driver
58-
* sizes: array of virtqueue sizes
5958
* Returns 0 on success or error status
6059
* @del_vqs: free virtqueues found by find_vqs().
6160
* @synchronize_cbs: synchronize with the virtqueue callbacks (optional)
@@ -104,9 +103,7 @@ struct virtio_config_ops {
104103
void (*reset)(struct virtio_device *vdev);
105104
int (*find_vqs)(struct virtio_device *, unsigned nvqs,
106105
struct virtqueue *vqs[], vq_callback_t *callbacks[],
107-
const char * const names[],
108-
u32 sizes[],
109-
const bool *ctx,
106+
const char * const names[], const bool *ctx,
110107
struct irq_affinity *desc);
111108
void (*del_vqs)(struct virtio_device *);
112109
void (*synchronize_cbs)(struct virtio_device *);
@@ -215,7 +212,7 @@ struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,
215212
const char *names[] = { n };
216213
struct virtqueue *vq;
217214
int err = vdev->config->find_vqs(vdev, 1, &vq, callbacks, names, NULL,
218-
NULL, NULL);
215+
NULL);
219216
if (err < 0)
220217
return ERR_PTR(err);
221218
return vq;
@@ -227,8 +224,7 @@ int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
227224
const char * const names[],
228225
struct irq_affinity *desc)
229226
{
230-
return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, NULL,
231-
NULL, desc);
227+
return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, NULL, desc);
232228
}
233229

234230
static inline
@@ -237,8 +233,8 @@ int virtio_find_vqs_ctx(struct virtio_device *vdev, unsigned nvqs,
237233
const char * const names[], const bool *ctx,
238234
struct irq_affinity *desc)
239235
{
240-
return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, NULL,
241-
ctx, desc);
236+
return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, ctx,
237+
desc);
242238
}
243239

244240
/**

0 commit comments

Comments
 (0)