numam-dpdk/drivers/bus/fslmc/mc
David Marchand 1094dd940e cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated
a lot of discrepancies about inclusion of the rte_compat.h header.

Some headers are including it where unneeded, while others rely on
implicit inclusion.

Fix unneeded inclusions:
$ git grep -l include..rte_compat.h |
  xargs grep -LE '__rte_(internal|experimental)' |
  xargs sed -i -e '/#include..rte_compat.h/d'

Fix missing inclusion, by inserting rte_compat.h before the first
inclusion of a DPDK header:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#include..\(rte_\|.*pmd.h.$\)/{
      s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/
    }'

Fix missing inclusion, by inserting rte_compat.h after the last
inclusion of a non DPDK header:
$ for file in $(git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h); do
    tac $file > $file.$$
    sed -i -e \
      '0,/#include../{
        s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/
      }' $file.$$
    tac $file.$$ > $file
    rm $file.$$
  done

Fix missing inclusion, by inserting rte_compat.h after the header guard:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#define/{
      s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/
    }'

And finally, exclude rte_compat.h itself.
$ git checkout lib/eal/include/rte_compat.h

At the end of all this, we have a clean tree:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h
buildtools/check-symbols.sh
devtools/checkpatches.sh
doc/guides/contributing/abi_policy.rst
doc/guides/rel_notes/release_20_11.rst
lib/eal/include/rte_compat.h

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-11-15 08:39:14 +01:00
..
dpbp.c bus/fslmc: upgrade mc FW APIs to 10.10.0 2018-10-16 14:54:25 +02:00
dpci.c drivers: update copyright for NXP files 2019-11-28 16:03:54 +01:00
dpcon.c drivers: update copyright for NXP files 2019-11-28 16:03:54 +01:00
dpdmai.c bus/fslmc: update MC FW to 10.28 2021-10-07 09:23:29 +02:00
dpio.c bus/fslmc: upgrade mc FW APIs to 10.10.0 2018-10-16 14:54:25 +02:00
dpmng.c drivers: use SPDX tag in NXP dpaa2 files 2018-01-04 22:41:39 +01:00
dprc.c bus/fslmc: add and scan DPRC devices 2022-01-20 16:24:09 +01:00
fsl_dpbp_cmd.h bus/fslmc: upgrade mc FW APIs to 10.10.0 2018-10-16 14:54:25 +02:00
fsl_dpbp.h bus/fslmc: mark internal symbols 2020-05-19 15:49:53 +02:00
fsl_dpci_cmd.h bus/fslmc: upgrade mc FW APIs to 10.10.0 2018-10-16 14:54:25 +02:00
fsl_dpci.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
fsl_dpcon_cmd.h drivers: use SPDX tag in NXP dpaa2 files 2018-01-04 22:41:39 +01:00
fsl_dpcon.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
fsl_dpdmai_cmd.h bus/fslmc: update MC FW to 10.28 2021-10-07 09:23:29 +02:00
fsl_dpdmai.h bus/fslmc: update MC FW to 10.28 2021-10-07 09:23:29 +02:00
fsl_dpio_cmd.h bus/fslmc: update MC firmware version 2019-10-23 16:43:08 +02:00
fsl_dpio.h bus/fslmc: mark internal symbols 2020-05-19 15:49:53 +02:00
fsl_dpmng_cmd.h drivers: use SPDX tag in NXP dpaa2 files 2018-01-04 22:41:39 +01:00
fsl_dpmng.h net/dpaa2: update management complex to 10.32 2022-05-10 15:43:08 +02:00
fsl_dpopr.h bus/fslmc: update MC FW to 10.28 2021-10-07 09:23:29 +02:00
fsl_dprc_cmd.h bus/fslmc: add and scan DPRC devices 2022-01-20 16:24:09 +01:00
fsl_dprc.h bus/fslmc: add and scan DPRC devices 2022-01-20 16:24:09 +01:00
fsl_mc_cmd.h bus/fslmc: mark internal symbols 2020-05-19 15:49:53 +02:00
fsl_mc_sys.h bus/fslmc: remove conflicting memory barrier macro 2020-01-17 12:02:15 +01:00
mc_sys.c bus/fslmc: add timeout in MC send command 2022-10-07 17:19:03 +02:00