Re: [PATCH vringh 2/2] caif_virtio: Introduce caif over virtio

From: Rusty Russell
Date: Tue Feb 19 2013 - 03:02:55 EST


Sjur BrÃndeland <sjurbren@xxxxxxxxx> writes:

>> Sjur BrÃndeland <sjurbren@xxxxxxxxx> writes:
>>> How about supporting struct vringh_kiov and struct kvec as well?
>>> I currently get the following complaints with my V2 patch-set:
>>>
>>> drivers/net/caif/caif_virtio.c:486:2: warning: passing argument 1 of
>>> âvringh_iov_initâ from incompatible pointer type [enabled by default]
>>
>> vringh_kiov_init()? Did I miss something else?
>
> I get a warning for my useof vringh_iov_cleanup() in
> addition to the one above.
>
> How about adding kiov variants of vringh_iov_cleanup()
> and vringh_iov_reset() as well?

Hmm, I have those here too (in the header):

+static inline void vringh_kiov_reset(struct vringh_kiov *kiov)
+{
+ kiov->off = 0;
+ kiov->i = 0;
+}
+
+static inline void vringh_kiov_cleanup(struct vringh_kiov *kiov)
+{
+ if (kiov->max_num & VRINGH_IOV_ALLOCATED)
+ kfree(kiov->iov);
+ kiov->max_num = kiov->used = kiov->i = kiov->off = 0;
+ kiov->iov = NULL;
+}

I've folded the patches and put them into my pending-rebases branch,
ready for virtio-next.

I'd really like MST's ack on this, too, so I'll repost the series.

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/