From: Shreyansh Jain Subject: Re: [PATCH] all: refactor coding style Date: Thu, 20 Jul 2017 10:34:39 +0530 Message-ID: <39182ae5-d8e1-f84a-6701-2732dfbfdb5f@nxp.com> References: <1500455196-182365-1-git-send-email-tiwei.bie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , "Van Haaren, Harry" To: Tiwei Bie , Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0060.outbound.protection.outlook.com [104.47.41.60]) by dpdk.org (Postfix) with ESMTP id 73EFB5599 for ; Thu, 20 Jul 2017 06:55:24 +0200 (CEST) In-Reply-To: <1500455196-182365-1-git-send-email-tiwei.bie@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wednesday 19 July 2017 02:36 PM, Tiwei Bie wrote: > Remove the unwanted spaces before `;' across DPDK source code > by below one-liner with some minor manual refinements. > > find . -name '*.[ch]' | xargs sed -i 's/\([^;(]\) \+;/\1;/g' > > The fixes for cmdline library are skipped, because it has a > different coding style. It deserves a separate cleanup if > necessary. The fixes for drivers' base code are also skipped > to keep the base code intact. > > Signed-off-by: Tiwei Bie > --- > app/test-pmd/testpmd.h | 4 ++-- > drivers/crypto/qat/qat_adf/icp_qat_fw.h | 2 +- > drivers/event/dpaa2/dpaa2_eventdev.c | 2 +- > drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- > drivers/net/bnx2x/bnx2x.c | 3 ++- > drivers/net/bnx2x/elink.h | 2 +- > drivers/net/e1000/igb_pf.c | 2 +- > drivers/net/ena/ena_ethdev.c | 4 ++-- > drivers/net/qede/qede_ethdev.c | 2 +- > drivers/net/vhost/rte_eth_vhost.c | 2 +- > drivers/net/virtio/virtio_rxtx.c | 4 ++-- > drivers/net/xenvirt/rte_eth_xenvirt.c | 4 ++-- > drivers/net/xenvirt/rte_xen_lib.c | 2 +- > drivers/net/xenvirt/virtqueue.h | 2 +- > examples/ip_pipeline/cpu_core_map.c | 4 ++-- > examples/multi_process/l2fwd_fork/main.c | 2 +- > examples/netmap_compat/lib/compat_netmap.c | 2 +- > examples/performance-thread/l3fwd-thread/main.c | 2 +- > examples/qos_sched/app_thread.c | 2 +- > examples/quota_watermark/qw/main.c | 2 +- > examples/vhost_xen/xenstore_parse.c | 3 +-- > lib/librte_distributor/rte_distributor.c | 12 +++++----- > lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +- > lib/librte_eal/linuxapp/eal/eal_xen_memory.c | 2 +- > lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 4 ++-- > .../linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 2 +- > .../linuxapp/kni/ethtool/ixgbe/kcompat.c | 2 +- > lib/librte_ether/rte_ethdev.c | 2 +- > lib/librte_sched/rte_approx.c | 8 +++---- > lib/librte_sched/rte_bitmap.h | 3 ++- > test/test/test_cryptodev.c | 2 +- > test/test/test_cryptodev_perf.c | 26 +++++++++++----------- > test/test/test_eventdev_sw.c | 2 +- > test/test/test_malloc.c | 4 ++-- > test/test/test_memory.c | 2 +- > test/test/test_mempool.c | 2 +- > test/test/test_ring.c | 6 ++--- > test/test/test_table_acl.c | 2 +- > test/test/test_table_pipeline.c | 2 +- > 39 files changed, 69 insertions(+), 70 deletions(-) > [...] I agree with Harry's comments (in another reply to this thread) that such patches might impact other pending patch series, quite late in merge window. But, this is a good-to-have set, probably early in 1711 window. > /* compute the number of steps to the right */ > diff --git a/lib/librte_sched/rte_bitmap.h b/lib/librte_sched/rte_bitmap.h > index 010d752..e487b58 100644 > --- a/lib/librte_sched/rte_bitmap.h > +++ b/lib/librte_sched/rte_bitmap.h > @@ -500,7 +500,8 @@ __rte_bitmap_scan_read(struct rte_bitmap *bmp, uint32_t *pos, uint64_t *slab) > uint64_t *slab2; > > slab2 = bmp->array2 + bmp->index2; > - for ( ; bmp->go2 ; bmp->index2 ++, slab2 ++, bmp->go2 = bmp->index2 & RTE_BITMAP_CL_SLAB_MASK) { > + for ( ; bmp->go2; bmp->index2++, slab2++, > + bmp->go2 = bmp->index2 & RTE_BITMAP_CL_SLAB_MASK) { ^^^^ Trivial: space before ';' in 'for' here should also be removed. [...] Other than the above (and also from dpaa2 code change perspective): Acked-by: Shreyansh Jain