Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932278AbbDHOtx (ORCPT ); Wed, 8 Apr 2015 10:49:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58292 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932211AbbDHOtt (ORCPT ); Wed, 8 Apr 2015 10:49:49 -0400 Date: Wed, 8 Apr 2015 16:49:46 +0200 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Rusty Russell , virtualization@lists.linux-foundation.org Subject: Re: [PATCH] virtio_config: reorder functions Message-ID: <20150408164933-mutt-send-email-mst@redhat.com> References: <1427814977-11504-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427814977-11504-1-git-send-email-mst@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2006 Lines: 60 On Tue, Mar 31, 2015 at 05:17:25PM +0200, Michael S. Tsirkin wrote: > This simply reorders functions in virtio_config > so width access wrapper helpers are all together. > Drops an extra empty line while we are at it. > > Signed-off-by: Michael S. Tsirkin Ping > --- > include/linux/virtio_config.h | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h > index ed1e0d5..1e306f7 100644 > --- a/include/linux/virtio_config.h > +++ b/include/linux/virtio_config.h > @@ -298,13 +298,6 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) > } \ > } while(0) > > -static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset) > -{ > - u8 ret; > - vdev->config->get(vdev, offset, &ret, sizeof(ret)); > - return ret; > -} > - > /* Read @count fields, @bytes each. */ > static inline void __virtio_cread_many(struct virtio_device *vdev, > unsigned int offset, > @@ -326,7 +319,6 @@ static inline void __virtio_cread_many(struct virtio_device *vdev, > } while (gen != old); > } > > - > static inline void virtio_cread_bytes(struct virtio_device *vdev, > unsigned int offset, > void *buf, size_t len) > @@ -334,6 +326,13 @@ static inline void virtio_cread_bytes(struct virtio_device *vdev, > __virtio_cread_many(vdev, offset, buf, len, 1); > } > > +static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset) > +{ > + u8 ret; > + vdev->config->get(vdev, offset, &ret, sizeof(ret)); > + return ret; > +} > + > static inline void virtio_cwrite8(struct virtio_device *vdev, > unsigned int offset, u8 val) > { > -- > MST -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/