From: Greg Kroah-Hartman Date: Mon, 11 Sep 2023 07:07:22 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v6.1.53~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86c682f0c656824d9f8ddad3000543d896d0deb3;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: clk-avoid-invalid-function-names-in-clk_of_declare.patch --- diff --git a/queue-6.1/clk-avoid-invalid-function-names-in-clk_of_declare.patch b/queue-6.1/clk-avoid-invalid-function-names-in-clk_of_declare.patch new file mode 100644 index 00000000000..c39e332c830 --- /dev/null +++ b/queue-6.1/clk-avoid-invalid-function-names-in-clk_of_declare.patch @@ -0,0 +1,76 @@ +From 5cf9d015be160e2d90d29ae74ef1364390e8fce8 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Wed, 8 Mar 2023 13:47:11 -0700 +Subject: clk: Avoid invalid function names in CLK_OF_DECLARE() + +From: Nathan Chancellor + +commit 5cf9d015be160e2d90d29ae74ef1364390e8fce8 upstream. + +After commit c28cd1f3433c ("clk: Mark a fwnode as initialized when using +CLK_OF_DECLARE() macro"), drivers/clk/mvebu/kirkwood.c fails to build: + + drivers/clk/mvebu/kirkwood.c:358:1: error: expected identifier or '(' + CLK_OF_DECLARE(98dx1135_clk, "marvell,mv98dx1135-core-clock", + ^ + include/linux/clk-provider.h:1367:21: note: expanded from macro 'CLK_OF_DECLARE' + static void __init name##_of_clk_init_declare(struct device_node *np) \ + ^ + :124:1: note: expanded from here + 98dx1135_clk_of_clk_init_declare + ^ + drivers/clk/mvebu/kirkwood.c:358:1: error: invalid digit 'd' in decimal constant + include/linux/clk-provider.h:1372:34: note: expanded from macro 'CLK_OF_DECLARE' + OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) + ^ + :125:3: note: expanded from here + 98dx1135_clk_of_clk_init_declare + ^ + drivers/clk/mvebu/kirkwood.c:358:1: error: invalid digit 'd' in decimal constant + include/linux/clk-provider.h:1372:34: note: expanded from macro 'CLK_OF_DECLARE' + OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) + ^ + :125:3: note: expanded from here + 98dx1135_clk_of_clk_init_declare + ^ + drivers/clk/mvebu/kirkwood.c:358:1: error: invalid digit 'd' in decimal constant + include/linux/clk-provider.h:1372:34: note: expanded from macro 'CLK_OF_DECLARE' + OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) + ^ + :125:3: note: expanded from here + 98dx1135_clk_of_clk_init_declare + ^ + +C function names must start with either an alphabetic letter or an +underscore. To avoid generating invalid function names from clock names, +add two underscores to the beginning of the identifier. + +Fixes: c28cd1f3433c ("clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro") +Suggested-by: Saravana Kannan +Signed-off-by: Nathan Chancellor +Link: https://lore.kernel.org/r/20230308-clk_of_declare-fix-v1-1-317b741e2532@kernel.org +Reviewed-by: Saravana Kannan +Reported-by: Naresh Kamboju +Signed-off-by: Stephen Boyd +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/clk-provider.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/include/linux/clk-provider.h ++++ b/include/linux/clk-provider.h +@@ -1362,12 +1362,12 @@ struct clk_hw_onecell_data { + }; + + #define CLK_OF_DECLARE(name, compat, fn) \ +- static void __init name##_of_clk_init_declare(struct device_node *np) \ ++ static void __init __##name##_of_clk_init_declare(struct device_node *np) \ + { \ + fn(np); \ + fwnode_dev_initialized(of_fwnode_handle(np), true); \ + } \ +- OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare) ++ OF_DECLARE_1(clk, name, compat, __##name##_of_clk_init_declare) + + /* + * Use this macro when you have a driver that requires two initialization diff --git a/queue-6.1/series b/queue-6.1/series index 7903dd804ba..f010726b173 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -597,3 +597,4 @@ nfsv4.2-rework-scratch-handling-for-read_plus-again.patch md-fix-regression-for-null-ptr-deference-in-__md_stop.patch clk-mark-a-fwnode-as-initialized-when-using-clk_of_declare-macro.patch treewide-fix-probing-of-devices-in-dt-overlays.patch +clk-avoid-invalid-function-names-in-clk_of_declare.patch