[dpdk-dev,5/5] net/virtio: squeeze repeated blank lines

Message ID 20171207053059.19487-6-tiwei.bie@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tiwei Bie Dec. 7, 2017, 5:30 a.m. UTC
  Squeeze repeated blank lines with below scripts:

for i in $(find . -name "*.[ch]"); do \
    cat -s $i > /tmp/x && mv /tmp/x $i; done

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 1 -
 drivers/net/virtio/virtio_logs.h   | 1 -
 drivers/net/virtio/virtio_pci.c    | 1 -
 drivers/net/virtio/virtio_pci.h    | 2 --
 drivers/net/virtio/virtio_rxtx.c   | 2 --
 5 files changed, 7 deletions(-)
  

Comments

Maxime Coquelin Dec. 7, 2017, 9:22 a.m. UTC | #1
On 12/07/2017 06:30 AM, Tiwei Bie wrote:
> Squeeze repeated blank lines with below scripts:
> 
> for i in $(find . -name "*.[ch]"); do \
>      cat -s $i > /tmp/x && mv /tmp/x $i; done
> 
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
>   drivers/net/virtio/virtio_ethdev.c | 1 -
>   drivers/net/virtio/virtio_logs.h   | 1 -
>   drivers/net/virtio/virtio_pci.c    | 1 -
>   drivers/net/virtio/virtio_pci.h    | 2 --
>   drivers/net/virtio/virtio_rxtx.c   | 2 --
>   5 files changed, 7 deletions(-)


I don't really like such cleaning patches.
It does not bring added value, but can create conflicts later when
backporting or rebasing.

Maxime

> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 9caa133c9..aa6d494ca 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1801,7 +1801,6 @@ virtio_dev_configure(struct rte_eth_dev *dev)
>   	return 0;
>   }
>   
> -
>   static int
>   virtio_dev_start(struct rte_eth_dev *dev)
>   {
> diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h
> index 90a79eaa5..6ce3149d5 100644
> --- a/drivers/net/virtio/virtio_logs.h
> +++ b/drivers/net/virtio/virtio_logs.h
> @@ -59,7 +59,6 @@
>   #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
>   #endif
>   
> -
>   #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DRIVER
>   #define PMD_DRV_LOG(level, fmt, args...) \
>   	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
> diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
> index 9574498fb..684ef560c 100644
> --- a/drivers/net/virtio/virtio_pci.c
> +++ b/drivers/net/virtio/virtio_pci.c
> @@ -481,7 +481,6 @@ const struct virtio_pci_ops modern_ops = {
>   	.notify_queue	= modern_notify_queue,
>   };
>   
> -
>   void
>   vtpci_read_dev_config(struct virtio_hw *hw, size_t offset,
>   		      void *dst, int length)
> diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
> index 3c5ce66ce..e42962a99 100644
> --- a/drivers/net/virtio/virtio_pci.h
> +++ b/drivers/net/virtio/virtio_pci.h
> @@ -274,7 +274,6 @@ struct virtio_hw {
>   	struct virtqueue **vqs;
>   };
>   
> -
>   /*
>    * While virtio_hw is stored in shared memory, this structure stores
>    * some infos that may vary in the multiple process model locally.
> @@ -290,7 +289,6 @@ struct virtio_hw_internal {
>   
>   extern struct virtio_hw_internal virtio_hw_internal[RTE_MAX_ETHPORTS];
>   
> -
>   /*
>    * This structure is just a reference to read
>    * net device specific config space; it just a chodu structure
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index 390c137c8..7ccd1da34 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -66,7 +66,6 @@
>   #define  VIRTIO_DUMP_PACKET(m, len) do { } while (0)
>   #endif
>   
> -
>   #define VIRTIO_SIMPLE_FLAGS ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
>   	ETH_TXQ_FLAGS_NOOFFLOADS)
>   
> @@ -175,7 +174,6 @@ virtio_xmit_cleanup(struct virtqueue *vq, uint16_t num)
>   	}
>   }
>   
> -
>   static inline int
>   virtqueue_enqueue_recv_refill(struct virtqueue *vq, struct rte_mbuf *cookie)
>   {
>
  
Tiwei Bie Dec. 7, 2017, 10:32 a.m. UTC | #2
On Thu, Dec 07, 2017 at 10:22:43AM +0100, Maxime Coquelin wrote:
> On 12/07/2017 06:30 AM, Tiwei Bie wrote:
> > Squeeze repeated blank lines with below scripts:
> > 
> > for i in $(find . -name "*.[ch]"); do \
> >      cat -s $i > /tmp/x && mv /tmp/x $i; done
> > 
> > Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> > ---
> >   drivers/net/virtio/virtio_ethdev.c | 1 -
> >   drivers/net/virtio/virtio_logs.h   | 1 -
> >   drivers/net/virtio/virtio_pci.c    | 1 -
> >   drivers/net/virtio/virtio_pci.h    | 2 --
> >   drivers/net/virtio/virtio_rxtx.c   | 2 --
> >   5 files changed, 7 deletions(-)
> 
> 
> I don't really like such cleaning patches.
> It does not bring added value, but can create conflicts later when
> backporting or rebasing.
> 

Okay. I'll drop this patch in the next version. Thanks!

Best regards,
Tiwei Bie
  

Patch

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 9caa133c9..aa6d494ca 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1801,7 +1801,6 @@  virtio_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }
 
-
 static int
 virtio_dev_start(struct rte_eth_dev *dev)
 {
diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h
index 90a79eaa5..6ce3149d5 100644
--- a/drivers/net/virtio/virtio_logs.h
+++ b/drivers/net/virtio/virtio_logs.h
@@ -59,7 +59,6 @@ 
 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-
 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DRIVER
 #define PMD_DRV_LOG(level, fmt, args...) \
 	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 9574498fb..684ef560c 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -481,7 +481,6 @@  const struct virtio_pci_ops modern_ops = {
 	.notify_queue	= modern_notify_queue,
 };
 
-
 void
 vtpci_read_dev_config(struct virtio_hw *hw, size_t offset,
 		      void *dst, int length)
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 3c5ce66ce..e42962a99 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -274,7 +274,6 @@  struct virtio_hw {
 	struct virtqueue **vqs;
 };
 
-
 /*
  * While virtio_hw is stored in shared memory, this structure stores
  * some infos that may vary in the multiple process model locally.
@@ -290,7 +289,6 @@  struct virtio_hw_internal {
 
 extern struct virtio_hw_internal virtio_hw_internal[RTE_MAX_ETHPORTS];
 
-
 /*
  * This structure is just a reference to read
  * net device specific config space; it just a chodu structure
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 390c137c8..7ccd1da34 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -66,7 +66,6 @@ 
 #define  VIRTIO_DUMP_PACKET(m, len) do { } while (0)
 #endif
 
-
 #define VIRTIO_SIMPLE_FLAGS ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
 	ETH_TXQ_FLAGS_NOOFFLOADS)
 
@@ -175,7 +174,6 @@  virtio_xmit_cleanup(struct virtqueue *vq, uint16_t num)
 	}
 }
 
-
 static inline int
 virtqueue_enqueue_recv_refill(struct virtqueue *vq, struct rte_mbuf *cookie)
 {