|WARNING| pw168605 [PATCH v14 19/25] vfio: cleanup and refactor
checkpatch at dpdk.org
checkpatch at dpdk.org
Fri Aug 28 15:10:08 CEST 2026
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/168605
_coding style issues_
WARNING:LONG_LINE: line length of 101 exceeds 100 columns
#1594: FILE: lib/eal/linux/eal_vfio.c:529:
+ ret = vfio_global_cfg.ops->dma_user_map_func(cfg, map->addr, map->iova, map->len, 1);
WARNING:LONG_LINE: line length of 107 exceeds 100 columns
#2732: FILE: lib/eal/linux/eal_vfio.c:1145:
+ if (vfio_global_cfg.mode != DEV_VFIO_MODE_GROUP && vfio_global_cfg.mode != DEV_VFIO_MODE_NOIOMMU) {
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#3997: FILE: lib/eal/linux/eal_vfio.h:123:
+#define VFIO_CONTAINER_FOREACH_ACTIVE(cfg) \
+ VFIO_CONTAINER_FOREACH((cfg)) \
+ if (((cfg)->active))
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#4006: FILE: lib/eal/linux/eal_vfio.h:132:
+#define VFIO_GROUP_FOREACH_ACTIVE(cfg, grp) \
+ VFIO_GROUP_FOREACH((cfg), (grp)) \
+ if ((grp)->active)
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#4015: FILE: lib/eal/linux/eal_vfio.h:141:
+#define VFIO_DEVICE_FOREACH_ACTIVE(cfg, dev) \
+ VFIO_DEVICE_FOREACH((cfg), (dev)) \
+ if ((dev)->active)
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#4975: FILE: lib/eal/linux/eal_vfio_group.c:897:
+ ops->type_id, ops->name, vfio_global_cfg.ops->type_id, vfio_global_cfg.ops->name);
total: 3 errors, 3 warnings, 4907 lines checked
More information about the test-report
mailing list