[PATCH v2 00/16] add define guards to avoid multi-inclusion

Stephen Hemminger stephen at networkplumber.org
Wed Feb 9 07:29:50 CET 2022


On Wed,  9 Feb 2022 11:02:08 +0800
Weiguo Li <liwg06 at foxmail.com> wrote:

> Supplement define guards to prevent multiple inclusion.
> 
> Notice that there are couples of guard styles used in this project,
> like "XX_H", "XX_H_" or "XXX_H__".
> Adhere to Thomas's advice, this patch set use the first style to
> make it simple.
> 
> Weiguo Li (16):
>   bus/dpaa: add define guards to avoid multi-inclusion
>   event/octeontx: add define guards to avoid multi-inclusion
>   net/cxgbe: add define guards to avoid multi-inclusion
>   net/enetfec: add define guards to avoid multi-inclusion
>   net/i40e: add define guards to avoid multi-inclusion
>   net/netvsc: add define guards to avoid multi-inclusion
>   net/qede: add define guards to avoid multi-inclusion
>   net/tap: add define guards to avoid multi-inclusion
>   net/virtio: add define guards to avoid multi-inclusion
>   raw/ifpga/base: add define guards to avoid multi-inclusion
>   kni: add define guards to avoid multi-inclusion
>   acl: add define guards to avoid multi-inclusion
>   eal: add define guards to avoid multi-inclusion
>   efd: add define guards to avoid multi-inclusion
>   hash: add define guards to avoid multi-inclusion
>   pcapng: add define guards to avoid multi-inclusion
> 
>  drivers/bus/dpaa/base/qbman/qman.h           | 5 +++++
>  drivers/event/octeontx/timvf_worker.h        | 5 +++++
>  drivers/net/cxgbe/base/t4_regs.h             | 5 +++++
>  drivers/net/enetfec/enet_uio.h               | 5 +++++
>  drivers/net/i40e/i40e_regs.h                 | 5 +++++
>  drivers/net/netvsc/hn_nvs.h                  | 5 +++++
>  drivers/net/netvsc/hn_rndis.h                | 5 +++++
>  drivers/net/netvsc/hn_var.h                  | 5 +++++
>  drivers/net/qede/base/reg_addr.h             | 5 +++++
>  drivers/net/qede/qede_sriov.h                | 5 +++++
>  drivers/net/tap/tap_bpf_insns.h              | 5 +++++
>  drivers/net/tap/tap_log.h                    | 5 +++++
>  drivers/net/virtio/virtio_rxtx_packed_avx.h  | 5 +++++
>  drivers/net/virtio/virtio_rxtx_packed_neon.h | 5 +++++
>  drivers/raw/ifpga/base/opae_at24_eeprom.h    | 5 +++++
>  kernel/linux/kni/compat.h                    | 5 +++++
>  lib/acl/acl_run_altivec.h                    | 5 +++++
>  lib/acl/acl_run_avx2.h                       | 5 +++++
>  lib/acl/acl_run_avx512x16.h                  | 5 +++++
>  lib/acl/acl_run_avx512x8.h                   | 5 +++++
>  lib/acl/acl_run_neon.h                       | 5 +++++
>  lib/acl/acl_run_sse.h                        | 5 +++++
>  lib/eal/include/rte_eal_paging.h             | 5 +++++
>  lib/eal/windows/include/rte_virt2phys.h      | 5 +++++
>  lib/efd/rte_efd_x86.h                        | 5 +++++
>  lib/hash/rte_cmp_arm64.h                     | 5 +++++
>  lib/hash/rte_cmp_x86.h                       | 5 +++++
>  lib/kni/rte_kni_fifo.h                       | 5 ++++-
>  lib/pcapng/pcapng_proto.h                    | 5 +++++
>  29 files changed, 144 insertions(+), 1 deletion(-)
> 

Some are good, but all the drivers and internal headers this change
is unnecessary. Please limit changes to where it matters.


More information about the dev mailing list