diff options
| author | David Marchand <[email protected]> | 2023-09-14 14:36:14 +0200 |
|---|---|---|
| committer | David Marchand <[email protected]> | 2023-09-19 10:52:05 +0200 |
| commit | 31e60e81f025e9fffa69b68bffe5cfaa22d5c098 (patch) | |
| tree | 280a8a2c1472f24816b70b1c221f7c9d81f5f7c9 /devtools | |
| parent | fce1a19aa39478f6c3656f16d0eb859419308086 (diff) | |
devtools: forbid inclusion of Linux header for PCI
Refrain from including Linux-only pci_regs.h header.
Instead, prefer our own definitions from the pci library.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Reviewed-by: Chenbo Xia <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Diffstat (limited to 'devtools')
| -rwxr-xr-x | devtools/checkpatches.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 55fabc5458..3a2a772573 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -135,6 +135,14 @@ check_forbidden_additions() { # <patch> -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # forbid inclusion of Linux header for PCI constants + awk -v FOLDERS="lib drivers app examples" \ + -v EXPRESSIONS='include.*linux/pci_regs\\.h' \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using linux/pci_regs.h, prefer rte_pci.h' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # forbid use of experimental build flag except in examples awk -v FOLDERS='lib drivers app' \ -v EXPRESSIONS='-DALLOW_EXPERIMENTAL_API allow_experimental_apis' \ |
