lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <OS0PR01MB5922893DE97EAAD6BAA142558624A@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date:   Wed, 28 Jun 2023 15:47:19 +0000
From:   Biju Das <biju.das.jz@...renesas.com>
To:     kernel test robot <lkp@...el.com>, Mark Brown <broonie@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
CC:     "oe-kbuild-all@...ts.linux.dev" <oe-kbuild-all@...ts.linux.dev>,
        Linux Memory Management List <linux-mm@...ck.org>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [linux-next:master 11663/12731] ERROR: modpost:
 "clk_unregister_fixed_rate" [drivers/regulator/raa215300.ko] undefined!

Hi All,

I have come up with two solutions for fixing this issue.

Please suggest which solution, I should submit.

First solution allows to build the driver for m68k architecture,
whereas the second solution skips it.

Solution 1: Add static inline functions in clk-provider.h
---------------------------------------------------------
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 28ff6f1a6ada..425a31c2816c 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -365,9 +365,6 @@ struct clk_hw *__clk_hw_register_fixed_rate(struct device *dev,
 		const struct clk_parent_data *parent_data, unsigned long flags,
 		unsigned long fixed_rate, unsigned long fixed_accuracy,
 		unsigned long clk_fixed_flags, bool devm);
-struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
-		const char *parent_name, unsigned long flags,
-		unsigned long fixed_rate);
 /**
  * clk_hw_register_fixed_rate - register fixed-rate clock with the clock
  * framework
@@ -481,7 +478,6 @@ struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
 				     (parent_data), (flags), (fixed_rate), 0,    \
 				     CLK_FIXED_RATE_PARENT_ACCURACY, false)
 
-void clk_unregister_fixed_rate(struct clk *clk);
 void clk_hw_unregister_fixed_rate(struct clk_hw *hw);
 
 void of_fixed_clk_setup(struct device_node *np);
@@ -1297,11 +1293,22 @@ const char *__clk_get_name(const struct clk *clk);
 const char *clk_hw_get_name(const struct clk_hw *hw);
 #ifdef CONFIG_COMMON_CLK
 struct clk_hw *__clk_get_hw(struct clk *clk);
+struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
+		const char *parent_name, unsigned long flags,
+		unsigned long fixed_rate);
+void clk_unregister_fixed_rate(struct clk *clk);
 #else
 static inline struct clk_hw *__clk_get_hw(struct clk *clk)
 {
 	return (struct clk_hw *)clk;
 }
+static inline struct clk *clk_register_fixed_rate(struct device *dev, const char *name,
+		const char *parent_name, unsigned long flags,
+		unsigned long fixed_rate)
+{
+	return ERR_PTR(-ENOENT);
+}
+static inline void clk_unregister_fixed_rate(struct clk *clk) {}
 #endif
 
 struct clk *clk_hw_get_clk(struct clk_hw *hw, const char *con_id);
Solution 2: Add dependency to COMMON_CLK
--------------------------------------

config REGULATOR_RAA215300
	tristate "Renesas RAA215300 driver"
	select REGMAP_I2C
+	depends on COMMON_CLK
	depends on I2C
	help
	  Support for the Renesas RAA215300 PMIC.

Cheers,
Biju

> -----Original Message-----
> From: kernel test robot <lkp@...el.com>
> Sent: Wednesday, June 28, 2023 1:53 PM
> To: Biju Das <biju.das.jz@...renesas.com>
> Cc: oe-kbuild-all@...ts.linux.dev; Linux Memory Management List <linux-
> mm@...ck.org>; Mark Brown <broonie@...nel.org>
> Subject: [linux-next:master 11663/12731] ERROR: modpost:
> "clk_unregister_fixed_rate" [drivers/regulator/raa215300.ko] undefined!
> 
> tree:
> 
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new
> version of the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes:
> 
> All errors (new ones prefixed by >>, old ones prefixed by <<):
> 
> >> ERROR: modpost: "clk_unregister_fixed_rate"
> [drivers/regulator/raa215300.ko] undefined!
> >> ERROR: modpost: "clk_register_fixed_rate"
> [drivers/regulator/raa215300.ko] undefined!
> 
> --
> 0-DAY CI Kernel Test Service

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ