Skip to contentSkip to conversation

virtio_config: reorder functions

PATCH Applied Michael S. Tsirkin 3 participants 5 messages Mar 31, 2015 – Apr 10, 2015 virtio core

lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 virtio_config: reorder functions

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.

---
 include/linux/virtio_config.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
include/linux/virtio_config.h +7 -8
index ed1e0d5..1e306f7 100644
@@ -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)
 {
Signature · 1 line
MST
author maintainer
#1 lore raw
Quoted 5 lines · Michael S. Tsirkin

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.

Ping

Quoted 46 lines
---
 include/linux/virtio_config.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
include/linux/virtio_config.h +7 -8
index ed1e0d5..1e306f7 100644
@@ -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)
 {
Signature · 1 line
MST
author maintainer
#2 lore raw
In reply to Michael S. Tsirkin
Quoted 5 lines · Michael S. Tsirkin

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.

Ping

Quoted 46 lines
---
 include/linux/virtio_config.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
include/linux/virtio_config.h +7 -8
index ed1e0d5..1e306f7 100644
@@ -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)
 {
Signature · 1 line
MST
Acked-by
#3 lore raw
Quoted 13 lines · On Wed, 8 Apr 2015 16:49:46 +0200 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 5 lines · Michael S. Tsirkin

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.

Ping

Quoted 4 lines
---
 include/linux/virtio_config.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
#4 lore raw
Quoted 10 lines · Cornelia Huck
Quoted 7 lines · On Wed, 8 Apr 2015 16:49:46 +0200 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 5 lines · Michael S. Tsirkin

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.

Quoted 8 lines
Quoted 6 lines

Ping

Quoted 4 lines
---
 include/linux/virtio_config.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

Sorry, it's in my virtio-next tree, I obviously failed to Ack.

Applied,
Rusty.