Skip to contentSkip to conversation

vhost: coding style fix

PATCH In review Michael S. Tsirkin 5 participants 6 messages Jan 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost: coding style fix

Drop a trailing whitespace. Make line shorter.

Fixes 76525114736e8 ("vhost: Only align sections for vhost-user")
---
 hw/virtio/vhost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/virtio/vhost.c +3 -3
index 25fd469179..9edfadc81d 100644
@@ -551,7 +551,7 @@ static void vhost_region_add_section(struct vhost_dev *dev,
     trace_vhost_region_add_section(section->mr->name, mrs_gpa, mrs_size,
                                    mrs_host);
 
-    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {   
+    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
         /* Round the section to it's page size */
         /* First align the start down to a page boundary */
         size_t mrs_page = qemu_ram_pagesize(mrs_rb);
@@ -566,8 +566,8 @@ static void vhost_region_add_section(struct vhost_dev *dev,
         if (alignage) {
             mrs_size += mrs_page - alignage;
         }
-        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa, mrs_size,
-                                               mrs_host);
+        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa,
+                                               mrs_size, mrs_host);
     }
 
     if (dev->n_tmp_sections) {
Signature · 1 line
MST
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · * Michael S. Tsirkin ([email protected]) wrote:

Drop a trailing whitespace. Make line shorter.

Fixes 76525114736e8 ("vhost: Only align sections for vhost-user")

Oops apologies for that.

Quoted 31 lines
---
 hw/virtio/vhost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/virtio/vhost.c +3 -3
index 25fd469179..9edfadc81d 100644
@@ -551,7 +551,7 @@ static void vhost_region_add_section(struct vhost_dev *dev,
     trace_vhost_region_add_section(section->mr->name, mrs_gpa, mrs_size,
                                    mrs_host);
 
-    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {   
+    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
         /* Round the section to it's page size */
         /* First align the start down to a page boundary */
         size_t mrs_page = qemu_ram_pagesize(mrs_rb);
@@ -566,8 +566,8 @@ static void vhost_region_add_section(struct vhost_dev *dev,
         if (alignage) {
             mrs_size += mrs_page - alignage;
         }
-        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa, mrs_size,
-                                               mrs_host);
+        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa,
+                                               mrs_size, mrs_host);
     }
 
     if (dev->n_tmp_sections) {
Signature · 1 line
MST

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

Reviewed-by on v1 1/1
#2 lore raw
In reply to Michael S. Tsirkin
Quoted 4 lines · Michael S. Tsirkin

Drop a trailing whitespace. Make line shorter.

Fixes 76525114736e8 ("vhost: Only align sections for vhost-user")
Quoted 28 lines
---
 hw/virtio/vhost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
hw/virtio/vhost.c +3 -3
index 25fd469179..9edfadc81d 100644
@@ -551,7 +551,7 @@ static void vhost_region_add_section(struct vhost_dev *dev,
     trace_vhost_region_add_section(section->mr->name, mrs_gpa, mrs_size,
                                    mrs_host);
 
-    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {   
+    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
         /* Round the section to it's page size */
         /* First align the start down to a page boundary */
         size_t mrs_page = qemu_ram_pagesize(mrs_rb);
@@ -566,8 +566,8 @@ static void vhost_region_add_section(struct vhost_dev *dev,
         if (alignage) {
             mrs_size += mrs_page - alignage;
         }
-        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa, mrs_size,
-                                               mrs_host);
+        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa,
+                                               mrs_size, mrs_host);
     }
 
     if (dev->n_tmp_sections) {
Signature · 1 line
Alex Bennée
#4 lore raw
In reply to Michael S. Tsirkin
Quoted 1 line · Michael S. Tsirkin

Drop a trailing whitespace. Make line shorter.

hmmm... wondering why Patchew didn't catch that. Any idea?

- Wainer

Quoted 31 lines
Fixes 76525114736e8 ("vhost: Only align sections for vhost-user")
---
  hw/virtio/vhost.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
hw/virtio/vhost.c +3 -3
index 25fd469179..9edfadc81d 100644
@@ -551,7 +551,7 @@ static void vhost_region_add_section(struct vhost_dev *dev,
      trace_vhost_region_add_section(section->mr->name, mrs_gpa, mrs_size,
                                     mrs_host);
 
-    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
+    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
          /* Round the section to it's page size */
          /* First align the start down to a page boundary */
          size_t mrs_page = qemu_ram_pagesize(mrs_rb);
@@ -566,8 +566,8 @@ static void vhost_region_add_section(struct vhost_dev *dev,
          if (alignage) {
              mrs_size += mrs_page - alignage;
          }
-        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa, mrs_size,
-                                               mrs_host);
+        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa,
+                                               mrs_size, mrs_host);
      }
 
      if (dev->n_tmp_sections) {
#5 lore raw
Quoted 8 lines · Wainer dos Santos Moschetta
Quoted 1 line · Michael S. Tsirkin

Drop a trailing whitespace. Make line shorter.

hmmm... wondering why Patchew didn't catch that. Any idea?

- Wainer

It did.

Quoted 29 lines
Quoted 29 lines
Fixes 76525114736e8 ("vhost: Only align sections for vhost-user")
---
  hw/virtio/vhost.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
hw/virtio/vhost.c +3 -3
index 25fd469179..9edfadc81d 100644
@@ -551,7 +551,7 @@ static void vhost_region_add_section(struct vhost_dev *dev,
      trace_vhost_region_add_section(section->mr->name, mrs_gpa, mrs_size,
                                     mrs_host);
-    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
+    if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) {
          /* Round the section to it's page size */
          /* First align the start down to a page boundary */
          size_t mrs_page = qemu_ram_pagesize(mrs_rb);
@@ -566,8 +566,8 @@ static void vhost_region_add_section(struct vhost_dev *dev,
          if (alignage) {
              mrs_size += mrs_page - alignage;
          }
-        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa, mrs_size,
-                                               mrs_host);
+        trace_vhost_region_add_section_aligned(section->mr->name, mrs_gpa,
+                                               mrs_size, mrs_host);
      }
      if (dev->n_tmp_sections) {