linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: kernel test robot <lkp@intel.com>,
	Mark Brown <broonie@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
	Linux Memory Management List <linux-mm@kvack.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [linux-next:master 11663/12731] ERROR: modpost: "clk_unregister_fixed_rate" [drivers/regulator/raa215300.ko] undefined!
Date: Wed, 28 Jun 2023 15:47:19 +0000	[thread overview]
Message-ID: <OS0PR01MB5922893DE97EAAD6BAA142558624A@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <202306282012.sPQAuAN7-lkp@intel.com>

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@intel.com>
> Sent: Wednesday, June 28, 2023 1:53 PM
> To: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: oe-kbuild-all@lists.linux.dev; Linux Memory Management List <linux-
> mm@kvack.org>; Mark Brown <broonie@kernel.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@intel.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


  reply	other threads:[~2023-06-28 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 12:52 kernel test robot
2023-06-28 15:47 ` Biju Das [this message]
2023-06-28 16:56   ` Mark Brown
2023-06-30  4:40   ` Stephen Boyd
2023-06-30  6:55     ` Biju Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OS0PR01MB5922893DE97EAAD6BAA142558624A@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox