Commit 99a64d3
committed
kABI: Fix kABI macros use COUNT_ARGS
deepin inclusion
category: bugfix
commit b229baa ("kernel.h: split out COUNT_ARGS() and CONCATENATE() to args.h")
move COUNT_ARGS to linux/args.h, it lead to make some headers not include it.
lead to strange build failed when use KABI_USE.
It can be reproduced in original rh_kabi.h(use centos 10) + upstream 6.6 in fwnode.h,
and commit 1dc05a2 ("device property: Replace custom implementation of COUNT_ARGS()")
include args.h, so it cannot be reproduced after v6.7 upstream.
Log:
In file included from ./include/linux/property.h:15,
from drivers/base/firmware_loader/fallback_platform.c:4:
./include/linux/fwnode.h:178:8: error: macro "_RH_KABI_REPLACE" requires 2 arguments, but only 1 given
178 | RH_KABI_USE(1, int b)
| ^ ~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/fwnode.h:130:
./include/linux/rh_kabi.h:441: note: macro "_RH_KABI_REPLACE" defined here
441 | # define _RH_KABI_REPLACE(_orig, _new) \
|
./include/linux/rh_kabi.h:490:33: error: expected specifier-qualifier-list before ‘_RH_KABI_REPLACE’
490 | #define _RH_KABI_USE(...) _RH_KABI_REPLACE(__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
./include/linux/rh_kabi.h:491:33: note: in expansion of macro ‘_RH_KABI_USE’
491 | #define RH_KABI_USE(n, ...) _RH_KABI_USE(__PASTE(_RH_KABI_USE, COUNT_ARGS(__VA_ARGS__))(n, __VA_ARGS__));
| ^~~~~~~~~~~~
./include/linux/fwnode.h:178:9: note: in expansion of macro ‘RH_KABI_USE’
178 | RH_KABI_USE(1, int b)
Fixes: 5083950 ("kABI: Introduce generic kABI macros to use for kABI workarounds")
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent aac1193 commit 99a64d3
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments