mbox series

[0/5] cleanup in library header files

Message ID 20230614142651.1456116-1-thomas@monjalon.net (mailing list archive)
Headers
Series cleanup in library header files |

Message

Thomas Monjalon June 14, 2023, 2:26 p.m. UTC
  While pulling some trees for DPDK 23.07-rc1,
I've seen that some wrong coding style for comments
were copied over and over.

In order to avoid copying wrong comment style,
the three first patches are fixing a lot of comments.
As it is not critical, they are not marked for backport.

While looking the header files, I've fixed some misuses of "extern".


Thomas Monjalon (5):
  lib: remove blank line ending comment blocks
  lib: remove extra asterisks ending comment blocks
  lib: align comment blocks
  lib: restrict use of keyword extern
  cryptodev: fix comments of modular operation parameters

 lib/acl/acl.h                           |   2 +-
 lib/acl/acl_gen.c                       |  10 +-
 lib/acl/acl_vect.h                      |   2 +-
 lib/bbdev/rte_bbdev.h                   |   2 -
 lib/bbdev/rte_bbdev_op.h                |   1 -
 lib/bbdev/rte_bbdev_pmd.h               |   1 -
 lib/bpf/bpf_impl.h                      |   8 +-
 lib/cfgfile/rte_cfgfile.h               | 303 ++++++++++++------------
 lib/cmdline/cmdline_parse.h             |   1 -
 lib/cmdline/cmdline_parse_string.h      |  14 +-
 lib/compressdev/rte_comp.h              |   1 -
 lib/compressdev/rte_compressdev.h       |   1 -
 lib/cryptodev/cryptodev_pmd.h           |   3 +-
 lib/cryptodev/rte_crypto.h              |   3 +-
 lib/cryptodev/rte_crypto_asym.h         |  16 +-
 lib/cryptodev/rte_crypto_sym.h          |   2 +-
 lib/cryptodev/rte_cryptodev.h           |  42 ++--
 lib/cryptodev/rte_cryptodev_core.h      |   1 -
 lib/eal/arm/include/rte_cycles_32.h     |  13 +-
 lib/eal/arm/include/rte_cycles_64.h     |   1 -
 lib/eal/common/eal_common_proc.c        |   1 -
 lib/eal/include/generic/rte_cycles.h    |   2 +-
 lib/eal/include/generic/rte_pause.h     |   1 -
 lib/eal/include/generic/rte_spinlock.h  |   1 -
 lib/eal/include/rte_bitmap.h            |   3 +-
 lib/eal/include/rte_branch_prediction.h |   2 -
 lib/eal/include/rte_eal.h               |   2 -
 lib/eal/include/rte_hexdump.h           |  53 ++---
 lib/eal/include/rte_interrupts.h        |   1 -
 lib/eal/include/rte_keepalive.h         |   3 +-
 lib/eal/include/rte_lcore.h             |   1 -
 lib/eal/include/rte_tailq.h             |   1 -
 lib/eal/include/rte_thread.h            |   1 -
 lib/eal/include/rte_ticketlock.h        |   1 -
 lib/eal/include/rte_trace_point.h       |   1 -
 lib/eal/linux/eal_vfio.h                |   4 +-
 lib/eal/ppc/include/rte_byteorder.h     |   2 +-
 lib/eal/windows/include/sys/queue.h     |   1 -
 lib/eal/x86/include/rte_byteorder_32.h  |   2 +-
 lib/eal/x86/include/rte_byteorder_64.h  |   2 +-
 lib/efd/rte_efd.c                       |   1 -
 lib/ethdev/ethdev_driver.h              |   1 -
 lib/ethdev/rte_ethdev.c                 |   1 -
 lib/ethdev/rte_ethdev.h                 |  66 +++---
 lib/ethdev/rte_ethdev_core.h            |   1 -
 lib/ethdev/rte_flow.h                   |  23 +-
 lib/ethdev/rte_mtr.h                    |   2 -
 lib/ethdev/rte_tm.h                     |   4 +-
 lib/ethdev/sff_8636.h                   |   2 -
 lib/ethdev/sff_common.h                 |   1 -
 lib/eventdev/event_timer_adapter_pmd.h  |   1 -
 lib/eventdev/eventdev_pmd.h             |  17 --
 lib/eventdev/rte_event_timer_adapter.h  |   2 -
 lib/eventdev/rte_eventdev.h             |  11 -
 lib/graph/rte_graph.h                   |   2 -
 lib/hash/rte_hash.h                     |   1 -
 lib/hash/rte_hash_crc.h                 |   1 -
 lib/ip_frag/rte_ipv6_fragmentation.c    |   1 -
 lib/ip_frag/rte_ipv6_reassembly.c       |   1 -
 lib/ipsec/ipsec_telemetry.c             |   1 -
 lib/member/rte_member.h                 |   1 -
 lib/mempool/rte_mempool.c               |   1 -
 lib/mempool/rte_mempool.h               |   1 -
 lib/meter/rte_meter.h                   |  10 +-
 lib/mldev/mldev_utils.h                 |   1 -
 lib/node/rte_node_eth_api.h             |   1 -
 lib/node/rte_node_ip4_api.h             |   1 -
 lib/node/rte_node_ip6_api.h             |   1 -
 lib/pcapng/rte_pcapng.h                 |   1 -
 lib/pdcp/rte_pdcp_group.h               |   1 -
 lib/pipeline/rte_pipeline.c             |   4 -
 lib/pipeline/rte_pipeline.h             |   9 +-
 lib/pipeline/rte_swx_ipsec.h            |   2 -
 lib/pipeline/rte_swx_pipeline_spec.c    |  11 -
 lib/pipeline/rte_table_action.c         |   2 +-
 lib/port/rte_port.h                     |   5 +-
 lib/port/rte_port_ethdev.h              |   3 +-
 lib/port/rte_port_eventdev.h            |   3 +-
 lib/port/rte_port_fd.h                  |   3 +-
 lib/port/rte_port_frag.h                |   3 +-
 lib/port/rte_port_kni.h                 |   4 +-
 lib/port/rte_port_ras.h                 |   4 +-
 lib/port/rte_port_ring.h                |   4 +-
 lib/port/rte_port_sched.h               |   3 +-
 lib/port/rte_port_source_sink.h         |   3 +-
 lib/port/rte_port_sym_crypto.h          |   3 +-
 lib/port/rte_swx_port_fd.h              |   5 +-
 lib/port/rte_swx_port_ring.h            |   3 +-
 lib/power/guest_channel.h               |   1 -
 lib/rawdev/rte_rawdev.h                 |   2 -
 lib/rawdev/rte_rawdev_pmd.h             |   3 -
 lib/rcu/rte_rcu_qsbr.h                  |   1 -
 lib/regexdev/rte_regexdev_core.h        |   1 -
 lib/reorder/rte_reorder.h               |   1 -
 lib/ring/rte_ring.h                     |   1 -
 lib/sched/rte_approx.h                  |   3 +-
 lib/sched/rte_pie.h                     |   4 +-
 lib/sched/rte_red.h                     |   6 +-
 lib/sched/rte_sched.c                   |   3 +-
 lib/sched/rte_sched.h                   |   8 +-
 lib/sched/rte_sched_common.h            |   2 -
 lib/security/rte_security.h             |   7 +-
 lib/security/rte_security_driver.h      |   1 -
 lib/table/rte_swx_table_em.c            |   1 -
 lib/table/rte_table.h                   |   3 +-
 lib/table/rte_table_acl.h               |   3 +-
 lib/table/rte_table_array.h             |   3 +-
 lib/table/rte_table_hash.h              |   4 +-
 lib/table/rte_table_hash_cuckoo.h       |   4 +-
 lib/table/rte_table_hash_ext.c          |  37 ++-
 lib/table/rte_table_hash_lru.c          | 109 +++++----
 lib/table/rte_table_lpm.h               |   3 +-
 lib/table/rte_table_lpm_ipv6.h          |   3 +-
 lib/table/rte_table_stub.h              |   4 +-
 lib/telemetry/rte_telemetry.h           |   2 +-
 lib/telemetry/telemetry_internal.h      |   3 +-
 lib/telemetry/telemetry_json.h          |   3 +-
 117 files changed, 386 insertions(+), 585 deletions(-)
  

Comments

Jerin Jacob June 14, 2023, 2:42 p.m. UTC | #1
On Wed, Jun 14, 2023 at 8:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> While pulling some trees for DPDK 23.07-rc1,
> I've seen that some wrong coding style for comments
> were copied over and over.
>
> In order to avoid copying wrong comment style,
> the three first patches are fixing a lot of comments.
> As it is not critical, they are not marked for backport.
>
> While looking the header files, I've fixed some misuses of "extern".

Thanks for the cleanup. IMO, it is better to update
./devtools/checkpatches.sh or so to flag these issue before getting to
repo for new changes,
  
Bruce Richardson June 14, 2023, 2:46 p.m. UTC | #2
On Wed, Jun 14, 2023 at 04:26:46PM +0200, Thomas Monjalon wrote:
> While pulling some trees for DPDK 23.07-rc1,
> I've seen that some wrong coding style for comments
> were copied over and over.
> 
> In order to avoid copying wrong comment style,
> the three first patches are fixing a lot of comments.
> As it is not critical, they are not marked for backport.
> 
> While looking the header files, I've fixed some misuses of "extern".
> 
> 
> Thomas Monjalon (5):
>   lib: remove blank line ending comment blocks
>   lib: remove extra asterisks ending comment blocks
>   lib: align comment blocks
>   lib: restrict use of keyword extern
>   cryptodev: fix comments of modular operation parameters
>

Some really good cleanup here, thanks.

Not sure we need to fix the use of extern for functions, but removing the
extern is harmless so ok for it.

Series-acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
David Marchand June 14, 2023, 3:08 p.m. UTC | #3
On Wed, Jun 14, 2023 at 4:42 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Wed, Jun 14, 2023 at 8:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > While pulling some trees for DPDK 23.07-rc1,
> > I've seen that some wrong coding style for comments
> > were copied over and over.
> >
> > In order to avoid copying wrong comment style,
> > the three first patches are fixing a lot of comments.
> > As it is not critical, they are not marked for backport.
> >
> > While looking the header files, I've fixed some misuses of "extern".
>
> Thanks for the cleanup. IMO, it is better to update
> ./devtools/checkpatches.sh or so to flag these issue before getting to
> repo for new changes,

Those are not easy to spot.
+1 to add a check if that won't raise false positives.
  
Thomas Monjalon June 14, 2023, 3:53 p.m. UTC | #4
14/06/2023 17:08, David Marchand:
> On Wed, Jun 14, 2023 at 4:42 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> >
> > On Wed, Jun 14, 2023 at 8:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > >
> > > While pulling some trees for DPDK 23.07-rc1,
> > > I've seen that some wrong coding style for comments
> > > were copied over and over.
> > >
> > > In order to avoid copying wrong comment style,
> > > the three first patches are fixing a lot of comments.
> > > As it is not critical, they are not marked for backport.
> > >
> > > While looking the header files, I've fixed some misuses of "extern".
> >
> > Thanks for the cleanup. IMO, it is better to update
> > ./devtools/checkpatches.sh or so to flag these issue before getting to
> > repo for new changes,
> 
> Those are not easy to spot.
> +1 to add a check if that won't raise false positives.

It will raise false positives.
And these are minor issues.
I think we can do a cleanup every 5 years, it is OK :)
  
Thomas Monjalon June 27, 2023, 2:52 p.m. UTC | #5
14/06/2023 16:46, Bruce Richardson:
> On Wed, Jun 14, 2023 at 04:26:46PM +0200, Thomas Monjalon wrote:
> > While pulling some trees for DPDK 23.07-rc1,
> > I've seen that some wrong coding style for comments
> > were copied over and over.
> > 
> > In order to avoid copying wrong comment style,
> > the three first patches are fixing a lot of comments.
> > As it is not critical, they are not marked for backport.
> > 
> > While looking the header files, I've fixed some misuses of "extern".
> > 
> > 
> > Thomas Monjalon (5):
> >   lib: remove blank line ending comment blocks
> >   lib: remove extra asterisks ending comment blocks
> >   lib: align comment blocks
> >   lib: restrict use of keyword extern
> >   cryptodev: fix comments of modular operation parameters
> >
> 
> Some really good cleanup here, thanks.
> 
> Not sure we need to fix the use of extern for functions, but removing the
> extern is harmless so ok for it.
> 
> Series-acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied