From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758293Ab3BSICw (ORCPT ); Tue, 19 Feb 2013 03:02:52 -0500 Received: from ozlabs.org ([203.10.76.45]:49195 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758099Ab3BSICm convert rfc822-to-8bit (ORCPT ); Tue, 19 Feb 2013 03:02:42 -0500 From: Rusty Russell To: Sjur =?utf-8?Q?Br=C3=A6ndeland?= Cc: "David S. Miller" , Ohad Ben-Cohen , Vikram ARV , Dmitry TARNYAGIN , Linus Walleij , "linux-kernel\@vger.kernel.org" , Erwan YVIN , "virtualization\@lists.linux-foundation.org" , "netdev\@vger.kernel.org" , Ido Yariv , Subject: Re: [PATCH vringh 2/2] caif_virtio: Introduce caif over virtio In-Reply-To: References: <1360494273-27889-1-git-send-email-sjur.brandeland@stericsson.com> <1360494273-27889-3-git-send-email-sjur.brandeland@stericsson.com> <87vc9zfic8.fsf@rustcorp.com.au> <81C3A93C17462B4BBD7E272753C105792458EDD161@EXDCVYMBSTM005.EQ1STM.local> <87ehgklds9.fsf@rustcorp.com.au> <87bobmjish.fsf@rustcorp.com.au> User-Agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/23.4.1 (i686-pc-linux-gnu) Date: Tue, 19 Feb 2013 09:00:13 +1030 Message-ID: <87ppzxi7be.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sjur Brændeland writes: >> Sjur Brændeland 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.