From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: Tiwei Bie <tiwei.bie@intel.com>, <dev@dpdk.org>
Cc: <thomas@monjalon.net>, "Van Haaren, Harry" <harry.van.haaren@intel.com>
Subject: Re: [dpdk-dev] [PATCH] all: refactor coding style
Date: Thu, 20 Jul 2017 10:34:39 +0530 [thread overview]
Message-ID: <39182ae5-d8e1-f84a-6701-2732dfbfdb5f@nxp.com> (raw)
In-Reply-To: <1500455196-182365-1-git-send-email-tiwei.bie@intel.com>
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 <tiwei.bie@intel.com>
> ---
> 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 <shreyansh.jain@nxp.com>
next prev parent reply other threads:[~2017-07-20 4:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 9:06 Tiwei Bie
2017-07-19 9:24 ` Van Haaren, Harry
2017-07-19 10:23 ` Tiwei Bie
2017-07-20 7:56 ` Jens Freimann
2017-07-20 8:32 ` Thomas Monjalon
2017-07-20 9:01 ` Tiwei Bie
2017-07-19 10:45 ` Trahe, Fiona
2017-07-20 5:04 ` Shreyansh Jain [this message]
2017-07-20 5:53 ` Tiwei Bie
2017-07-20 7:13 ` Shreyansh Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39182ae5-d8e1-f84a-6701-2732dfbfdb5f@nxp.com \
--to=shreyansh.jain@nxp.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=thomas@monjalon.net \
--cc=tiwei.bie@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).