Patch "clk: Avoid invalid function names in CLK_OF_DECLARE()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clk: Avoid invalid function names in CLK_OF_DECLARE()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clk-avoid-invalid-function-names-in-clk_of_declare.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 5cf9d015be160e2d90d29ae74ef1364390e8fce8 Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <nathan@xxxxxxxxxx>
Date: Wed, 8 Mar 2023 13:47:11 -0700
Subject: clk: Avoid invalid function names in CLK_OF_DECLARE()

From: Nathan Chancellor <nathan@xxxxxxxxxx>

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) \
                            ^
 <scratch space>: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)
                                         ^
 <scratch space>: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)
                                         ^
 <scratch space>: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)
                                         ^
 <scratch space>: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 <saravanak@xxxxxxxxxx>
Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20230308-clk_of_declare-fix-v1-1-317b741e2532@xxxxxxxxxx
Reviewed-by: Saravana Kannan <saravanak@xxxxxxxxxx>
Reported-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx>
Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 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


Patches currently in stable-queue which might be from nathan@xxxxxxxxxx are

queue-6.1/tools-resolve_btfids-fix-setting-hostcflags.patch
queue-6.1/tools-lib-subcmd-make-install_headers-clearer.patch
queue-6.1/tools-resolve_btfids-compile-resolve_btfids-as-host-program.patch
queue-6.1/tools-resolve_btfids-use-pkg-config-to-locate-libelf.patch
queue-6.1/tools-lib-subcmd-add-install-target.patch
queue-6.1/kbuild-rust_is_available-add-check-for-bindgen-invoc.patch
queue-6.1/tools-resolve_btfids-install-subcmd-headers.patch
queue-6.1/um-fix-hostaudio-build-errors.patch
queue-6.1/s390-dasd-fix-string-length-handling.patch
queue-6.1/kbuild-rust_is_available-fix-confusion-when-a-versio.patch
queue-6.1/tools-resolve_btfids-tidy-host_overrides.patch
queue-6.1/kbuild-rust_is_available-remove-v-option.patch
queue-6.1/clk-avoid-invalid-function-names-in-clk_of_declare.patch
queue-6.1/tools-resolve_btfids-pass-hostcflags-as-extra_cflags-to-prepare-targets.patch
queue-6.1/powerpc-boot-disable-power10-features-after-bootafla.patch
queue-6.1/kbuild-rust_is_available-fix-version-check-when-cc-h.patch
queue-6.1/tools-lib-subcmd-add-dependency-test-to-install_headers.patch
queue-6.1/tools-resolve_btfids-alter-how-hostcc-is-forced.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux