* [PATCH] virtio_config: reorder functions
@ 2015-03-31 15:17 Michael S. Tsirkin
2015-04-08 14:49 ` Michael S. Tsirkin
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-03-31 15:17 UTC (permalink / raw)
To: linux-kernel; +Cc: Rusty Russell, virtualization
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 <mst@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] virtio_config: reorder functions
2015-03-31 15:17 [PATCH] virtio_config: reorder functions Michael S. Tsirkin
@ 2015-04-08 14:49 ` Michael S. Tsirkin
2015-04-09 12:46 ` Cornelia Huck
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-04-08 14:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Rusty Russell, virtualization
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 <mst@redhat.com>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] virtio_config: reorder functions
2015-04-08 14:49 ` Michael S. Tsirkin
@ 2015-04-09 12:46 ` Cornelia Huck
2015-04-10 3:21 ` Rusty Russell
0 siblings, 1 reply; 4+ messages in thread
From: Cornelia Huck @ 2015-04-09 12:46 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: linux-kernel, virtualization
On Wed, 8 Apr 2015 16:49:46 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> 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 <mst@redhat.com>
>
> Ping
>
> > ---
> > include/linux/virtio_config.h | 15 +++++++--------
> > 1 file changed, 7 insertions(+), 8 deletions(-)
> >
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] virtio_config: reorder functions
2015-04-09 12:46 ` Cornelia Huck
@ 2015-04-10 3:21 ` Rusty Russell
0 siblings, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2015-04-10 3:21 UTC (permalink / raw)
To: Cornelia Huck, Michael S. Tsirkin; +Cc: linux-kernel, virtualization
Cornelia Huck <cornelia.huck@de.ibm.com> writes:
> On Wed, 8 Apr 2015 16:49:46 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
>> 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 <mst@redhat.com>
>>
>> Ping
>>
>> > ---
>> > include/linux/virtio_config.h | 15 +++++++--------
>> > 1 file changed, 7 insertions(+), 8 deletions(-)
>> >
>
> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Sorry, it's in my virtio-next tree, I obviously failed to Ack.
Applied,
Rusty.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-11 0:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 15:17 [PATCH] virtio_config: reorder functions Michael S. Tsirkin
2015-04-08 14:49 ` Michael S. Tsirkin
2015-04-09 12:46 ` Cornelia Huck
2015-04-10 3:21 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).