Skip to content

Commit 99a64d3

Browse files
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

File tree

include/linux/deepin_kabi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#ifndef _LINUX_DEEPIN_KABI_H
3232
#define _LINUX_DEEPIN_KABI_H
3333

34+
#include <linux/args.h>
3435
#include <linux/kconfig.h>
3536
#include <linux/compiler.h>
3637
#include <linux/stringify.h>

0 commit comments

Comments
 (0)