[RFC,05/14] build: clean up driver list indentation

Message ID 20210401115009.1063844-6-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Build file update proposals |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson April 1, 2021, 11:50 a.m. UTC
  Ensure all lists of drivers are one-per-line and replace tabs with spaces
in each file to correspond to the new standard.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/baseband/meson.build |   8 ++-
 drivers/bus/meson.build      |   7 ++-
 drivers/common/meson.build   |   9 +++-
 drivers/compress/meson.build |   7 ++-
 drivers/crypto/meson.build   |  38 ++++++-------
 drivers/event/meson.build    |  17 ++++--
 drivers/mempool/meson.build  |   8 ++-
 drivers/meson.build          |  33 ++++++------
 drivers/net/meson.build      | 102 +++++++++++++++++------------------
 drivers/raw/meson.build      |  15 +++---
 drivers/regex/meson.build    |   3 +-
 drivers/vdpa/meson.build     |   4 +-
 12 files changed, 142 insertions(+), 109 deletions(-)
  

Comments

Andrew Rybchenko April 1, 2021, 12:14 p.m. UTC | #1
On 4/1/21 2:50 PM, Bruce Richardson wrote:
> Ensure all lists of drivers are one-per-line and replace tabs with spaces
> in each file to correspond to the new standard.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  drivers/baseband/meson.build |   8 ++-
>  drivers/bus/meson.build      |   7 ++-
>  drivers/common/meson.build   |   9 +++-
>  drivers/compress/meson.build |   7 ++-
>  drivers/crypto/meson.build   |  38 ++++++-------
>  drivers/event/meson.build    |  17 ++++--
>  drivers/mempool/meson.build  |   8 ++-
>  drivers/meson.build          |  33 ++++++------
>  drivers/net/meson.build      | 102 +++++++++++++++++------------------
>  drivers/raw/meson.build      |  15 +++---
>  drivers/regex/meson.build    |   3 +-
>  drivers/vdpa/meson.build     |   4 +-
>  12 files changed, 142 insertions(+), 109 deletions(-)
> 
> diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
> index 920e3b02ee..22d0036cd7 100644
> --- a/drivers/baseband/meson.build
> +++ b/drivers/baseband/meson.build
> @@ -2,7 +2,11 @@
>  # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
>  
>  if is_windows
> -	subdir_done()
> +    subdir_done()
>  endif
>  
> -drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec', 'acc100']
> +drivers = ['null',
> +        'turbo_sw',
> +        'fpga_lte_fec',
> +        'fpga_5gnr_fec',
> +        'acc100']

It looks like it is more than 4 spaces here (and many similar
cases below), but previous patch and longs lists below in the
file use 4 spaces alignment.
  
Bruce Richardson April 1, 2021, 12:33 p.m. UTC | #2
On Thu, Apr 01, 2021 at 03:14:40PM +0300, Andrew Rybchenko wrote:
> On 4/1/21 2:50 PM, Bruce Richardson wrote:
> > Ensure all lists of drivers are one-per-line and replace tabs with spaces
> > in each file to correspond to the new standard.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  drivers/baseband/meson.build |   8 ++-
> >  drivers/bus/meson.build      |   7 ++-
> >  drivers/common/meson.build   |   9 +++-
> >  drivers/compress/meson.build |   7 ++-
> >  drivers/crypto/meson.build   |  38 ++++++-------
> >  drivers/event/meson.build    |  17 ++++--
> >  drivers/mempool/meson.build  |   8 ++-
> >  drivers/meson.build          |  33 ++++++------
> >  drivers/net/meson.build      | 102 +++++++++++++++++------------------
> >  drivers/raw/meson.build      |  15 +++---
> >  drivers/regex/meson.build    |   3 +-
> >  drivers/vdpa/meson.build     |   4 +-
> >  12 files changed, 142 insertions(+), 109 deletions(-)
> > 
> > diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
> > index 920e3b02ee..22d0036cd7 100644
> > --- a/drivers/baseband/meson.build
> > +++ b/drivers/baseband/meson.build
> > @@ -2,7 +2,11 @@
> >  # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
> >  
> >  if is_windows
> > -	subdir_done()
> > +    subdir_done()
> >  endif
> >  
> > -drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec', 'acc100']
> > +drivers = ['null',
> > +        'turbo_sw',
> > +        'fpga_lte_fec',
> > +        'fpga_5gnr_fec',
> > +        'acc100']
> 
> It looks like it is more than 4 spaces here (and many similar
> cases below), but previous patch and longs lists below in the
> file use 4 spaces alignment.

Yes, for indenting line continuations, I've tended to prefer to use a
double-indent, and save single indent for new blocks of code.
  
Andrew Rybchenko April 1, 2021, 12:40 p.m. UTC | #3
On 4/1/21 3:33 PM, Bruce Richardson wrote:
> On Thu, Apr 01, 2021 at 03:14:40PM +0300, Andrew Rybchenko wrote:
>> On 4/1/21 2:50 PM, Bruce Richardson wrote:
>>> Ensure all lists of drivers are one-per-line and replace tabs with spaces
>>> in each file to correspond to the new standard.
>>>
>>> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
>>> ---
>>>  drivers/baseband/meson.build |   8 ++-
>>>  drivers/bus/meson.build      |   7 ++-
>>>  drivers/common/meson.build   |   9 +++-
>>>  drivers/compress/meson.build |   7 ++-
>>>  drivers/crypto/meson.build   |  38 ++++++-------
>>>  drivers/event/meson.build    |  17 ++++--
>>>  drivers/mempool/meson.build  |   8 ++-
>>>  drivers/meson.build          |  33 ++++++------
>>>  drivers/net/meson.build      | 102 +++++++++++++++++------------------
>>>  drivers/raw/meson.build      |  15 +++---
>>>  drivers/regex/meson.build    |   3 +-
>>>  drivers/vdpa/meson.build     |   4 +-
>>>  12 files changed, 142 insertions(+), 109 deletions(-)
>>>
>>> diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
>>> index 920e3b02ee..22d0036cd7 100644
>>> --- a/drivers/baseband/meson.build
>>> +++ b/drivers/baseband/meson.build
>>> @@ -2,7 +2,11 @@
>>>  # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
>>>  
>>>  if is_windows
>>> -	subdir_done()
>>> +    subdir_done()
>>>  endif
>>>  
>>> -drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec', 'acc100']
>>> +drivers = ['null',
>>> +        'turbo_sw',
>>> +        'fpga_lte_fec',
>>> +        'fpga_5gnr_fec',
>>> +        'acc100']
>> It looks like it is more than 4 spaces here (and many similar
>> cases below), but previous patch and longs lists below in the
>> file use 4 spaces alignment.
> Yes, for indenting line continuations, I've tended to prefer to use a
> double-indent, and save single indent for new blocks of code.

I see. May be it is better to put the first 'null' and the last 'acc100' on
its own line with trailing comma?

Also shouldn't the list be alpha-numerically sorted?
  

Patch

diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build
index 920e3b02ee..22d0036cd7 100644
--- a/drivers/baseband/meson.build
+++ b/drivers/baseband/meson.build
@@ -2,7 +2,11 @@ 
 # Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
-drivers = ['null', 'turbo_sw', 'fpga_lte_fec', 'fpga_5gnr_fec', 'acc100']
+drivers = ['null',
+        'turbo_sw',
+        'fpga_lte_fec',
+        'fpga_5gnr_fec',
+        'acc100']
diff --git a/drivers/bus/meson.build b/drivers/bus/meson.build
index 2e7727af08..65716c23f9 100644
--- a/drivers/bus/meson.build
+++ b/drivers/bus/meson.build
@@ -1,5 +1,10 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-drivers = ['dpaa', 'fslmc', 'ifpga', 'pci', 'vdev', 'vmbus']
+drivers = ['dpaa',
+        'fslmc',
+        'ifpga',
+        'pci',
+        'vdev',
+        'vmbus']
 std_deps = ['eal']
diff --git a/drivers/common/meson.build b/drivers/common/meson.build
index 66e12143b2..dfebb17e29 100644
--- a/drivers/common/meson.build
+++ b/drivers/common/meson.build
@@ -2,8 +2,13 @@ 
 # Copyright(c) 2018 Cavium, Inc
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
 std_deps = ['eal']
-drivers = ['cpt', 'dpaax', 'iavf', 'mvep', 'octeontx', 'octeontx2']
+drivers = ['cpt',
+        'dpaax',
+        'iavf',
+        'mvep',
+        'octeontx',
+        'octeontx2']
diff --git a/drivers/compress/meson.build b/drivers/compress/meson.build
index 49fa02d4ce..9cd631dff3 100644
--- a/drivers/compress/meson.build
+++ b/drivers/compress/meson.build
@@ -2,9 +2,12 @@ 
 # Copyright(c) 2018 Intel Corporation
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
-drivers = ['isal', 'mlx5', 'octeontx', 'zlib']
+drivers = ['isal',
+        'mlx5',
+        'octeontx',
+        'zlib']
 
 std_deps = ['compressdev'] # compressdev pulls in all other needed deps
diff --git a/drivers/crypto/meson.build b/drivers/crypto/meson.build
index c927c5f8d3..e337fc5d1d 100644
--- a/drivers/crypto/meson.build
+++ b/drivers/crypto/meson.build
@@ -2,27 +2,27 @@ 
 # Copyright(c) 2017 Intel Corporation
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
 drivers = ['aesni_gcm',
-	   'aesni_mb',
-	   'armv8',
-	   'bcmfs',
-	   'caam_jr',
-	   'ccp',
-	   'dpaa_sec',
-	   'dpaa2_sec',
-	   'kasumi',
-	   'mvsam',
-	   'nitrox',
-	   'null',
-	   'octeontx',
-	   'octeontx2',
-	   'openssl',
-	   'scheduler',
-	   'snow3g',
-	   'virtio',
-	   'zuc']
+       'aesni_mb',
+       'armv8',
+       'bcmfs',
+       'caam_jr',
+       'ccp',
+       'dpaa_sec',
+       'dpaa2_sec',
+       'kasumi',
+       'mvsam',
+       'nitrox',
+       'null',
+       'octeontx',
+       'octeontx2',
+       'openssl',
+       'scheduler',
+       'snow3g',
+       'virtio',
+       'zuc']
 
 std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
diff --git a/drivers/event/meson.build b/drivers/event/meson.build
index a49288a5d4..60eac20dd6 100644
--- a/drivers/event/meson.build
+++ b/drivers/event/meson.build
@@ -2,13 +2,20 @@ 
 # Copyright(c) 2017 Intel Corporation
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
-drivers = ['dlb', 'dlb2', 'dpaa', 'dpaa2', 'octeontx2', 'opdl', 'skeleton', 'sw',
-	   'dsw']
+drivers = ['dlb',
+        'dlb2',
+        'dpaa',
+        'dpaa2',
+        'octeontx2',
+        'opdl',
+        'skeleton',
+        'sw',
+        'dsw']
 if not (toolchain == 'gcc' and cc.version().version_compare('<4.8.6') and
-	dpdk_conf.has('RTE_ARCH_ARM64'))
-	drivers += 'octeontx'
+    dpdk_conf.has('RTE_ARCH_ARM64'))
+    drivers += 'octeontx'
 endif
 std_deps = ['eventdev', 'kvargs']
diff --git a/drivers/mempool/meson.build b/drivers/mempool/meson.build
index 4428813dae..8dacc74016 100644
--- a/drivers/mempool/meson.build
+++ b/drivers/mempool/meson.build
@@ -1,5 +1,11 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-drivers = ['bucket', 'dpaa', 'dpaa2', 'octeontx', 'octeontx2', 'ring', 'stack']
+drivers = ['bucket',
+        'dpaa',
+        'dpaa2',
+        'octeontx',
+        'octeontx2',
+        'ring',
+        'stack']
 std_deps = ['mempool']
diff --git a/drivers/meson.build b/drivers/meson.build
index 57b15bda03..cb273406c0 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -3,31 +3,30 @@ 
 
 # Defines the order of dependencies evaluation
 subdirs = [
-	'common',
-	'bus',
-	'common/mlx5', # depends on bus.
-	'common/qat', # depends on bus.
-	'common/sfc_efx', # depends on bus.
-	'mempool', # depends on common and bus.
-	'net',     # depends on common, bus, mempool
-	'raw',     # depends on common, bus and net.
-	'crypto',  # depends on common, bus and mempool (net in future).
-	'compress', # depends on common, bus, mempool.
-	'regex', # depends on common, bus, regexdev.
-	'vdpa',    # depends on common, bus and mempool.
-	'event',   # depends on common, bus, mempool and net.
-	'baseband', # depends on common and bus.
+    'common',
+    'bus',
+    'common/mlx5', # depends on bus.
+    'common/qat', # depends on bus.
+    'common/sfc_efx', # depends on bus.
+    'mempool', # depends on common and bus.
+    'net',     # depends on common, bus, mempool
+    'raw',     # depends on common, bus and net.
+    'crypto',  # depends on common, bus and mempool (net in future).
+    'compress', # depends on common, bus, mempool.
+    'regex', # depends on common, bus, regexdev.
+    'vdpa',    # depends on common, bus and mempool.
+    'event',   # depends on common, bus, mempool and net.
+    'baseband', # depends on common and bus.
 ]
 
-disabled_drivers = run_command(list_dir_globs, get_option('disable_drivers'),
-		).stdout().split()
+disabled_drivers = run_command(list_dir_globs, get_option('disable_drivers')).stdout().split()
 
 default_cflags = machine_args
 default_cflags += ['-DALLOW_EXPERIMENTAL_API']
 default_cflags += ['-DALLOW_INTERNAL_API']
 
 if cc.has_argument('-Wno-format-truncation')
-	default_cflags += '-Wno-format-truncation'
+    default_cflags += '-Wno-format-truncation'
 endif
 
 foreach subpath:subdirs
diff --git a/drivers/net/meson.build b/drivers/net/meson.build
index fb9ff05a1f..c2ecb57b4f 100644
--- a/drivers/net/meson.build
+++ b/drivers/net/meson.build
@@ -3,57 +3,57 @@ 
 
 
 drivers = ['af_packet',
-	'af_xdp',
-	'ark',
-	'atlantic',
-	'avp',
-	'axgbe', 'bonding',
-	'bnx2x',
-	'bnxt',
-	'cxgbe',
-	'dpaa', 'dpaa2',
-	'e1000',
-	'ena',
-	'enetc',
-	'enic',
-	'failsafe',
-	'fm10k', 'i40e',
-	'hinic',
-	'hns3',
-	'iavf',
-	'ice',
-	'igc',
-	'ionic',
-	'ipn3ke',
-	'ixgbe',
-	'kni',
-	'liquidio',
-	'memif',
-	'mlx4',
-	'mlx5',
-	'mvneta',
-	'mvpp2',
-	'netvsc',
-	'nfb',
-	'nfp',
-	'null',
-	'octeontx',
-	'octeontx2',
-	'octeontx_ep',
-	'pcap',
-	'pfe',
-	'qede',
-	'ring',
-	'sfc',
-	'softnic',
-	'szedata2',
-	'tap',
-	'thunderx',
-	'txgbe',
-	'vdev_netvsc',
-	'vhost',
-	'virtio',
-	'vmxnet3',
+    'af_xdp',
+    'ark',
+    'atlantic',
+    'avp',
+    'axgbe', 'bonding',
+    'bnx2x',
+    'bnxt',
+    'cxgbe',
+    'dpaa', 'dpaa2',
+    'e1000',
+    'ena',
+    'enetc',
+    'enic',
+    'failsafe',
+    'fm10k', 'i40e',
+    'hinic',
+    'hns3',
+    'iavf',
+    'ice',
+    'igc',
+    'ionic',
+    'ipn3ke',
+    'ixgbe',
+    'kni',
+    'liquidio',
+    'memif',
+    'mlx4',
+    'mlx5',
+    'mvneta',
+    'mvpp2',
+    'netvsc',
+    'nfb',
+    'nfp',
+    'null',
+    'octeontx',
+    'octeontx2',
+    'octeontx_ep',
+    'pcap',
+    'pfe',
+    'qede',
+    'ring',
+    'sfc',
+    'softnic',
+    'szedata2',
+    'tap',
+    'thunderx',
+    'txgbe',
+    'vdev_netvsc',
+    'vhost',
+    'virtio',
+    'vmxnet3',
 ]
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
 std_deps += ['bus_pci']         # very many PMDs depend on PCI, so make std
diff --git a/drivers/raw/meson.build b/drivers/raw/meson.build
index 8c3a036dfd..cb45019c59 100644
--- a/drivers/raw/meson.build
+++ b/drivers/raw/meson.build
@@ -2,12 +2,15 @@ 
 # Copyright 2018 NXP
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
-drivers = ['dpaa2_cmdif', 'dpaa2_qdma',
-	'ifpga', 'ioat', 'ntb',
-	'octeontx2_dma',
-	'octeontx2_ep',
-	'skeleton']
+drivers = ['dpaa2_cmdif',
+    'dpaa2_qdma',
+    'ifpga',
+    'ioat',
+    'ntb',
+    'octeontx2_dma',
+    'octeontx2_ep',
+    'skeleton']
 std_deps = ['rawdev']
diff --git a/drivers/regex/meson.build b/drivers/regex/meson.build
index 2d05d5af12..ccdaa688b5 100644
--- a/drivers/regex/meson.build
+++ b/drivers/regex/meson.build
@@ -1,5 +1,6 @@ 
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
-drivers = ['mlx5', 'octeontx2']
+drivers = ['mlx5',
+        'octeontx2']
 std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
diff --git a/drivers/vdpa/meson.build b/drivers/vdpa/meson.build
index 4929be4c03..a46f02bfb3 100644
--- a/drivers/vdpa/meson.build
+++ b/drivers/vdpa/meson.build
@@ -2,10 +2,10 @@ 
 # Copyright 2019 Mellanox Technologies, Ltd
 
 if is_windows
-	subdir_done()
+    subdir_done()
 endif
 
 drivers = ['ifc',
-	   'mlx5',]
+       'mlx5',]
 std_deps = ['bus_pci', 'kvargs']
 std_deps += ['vhost']