All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 1141/1756] drivers/pwm/pwm-stm32.c:662:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'?
@ 2024-03-26 19:39 kernel test robot
  2024-03-27  7:33 ` [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get() Uwe Kleine-König
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2024-03-26 19:39 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: oe-kbuild-all, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   084c8e315db34b59d38d06e684b1a0dd07d30287
commit: 50d05a09e8474fa4768ffd39cce6af7f73cf003b [1141/1756] pwm: stm32: Fix for settings using period > UINT32_MAX
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20240327/202403270305.ydvX9xq1-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240327/202403270305.ydvX9xq1-lkp@intel.com/reproduce)

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: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pwm/pwm-stm32.c: In function 'stm32_pwm_probe':
>> drivers/pwm/pwm-stm32.c:662:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'? [-Werror=implicit-function-declaration]
     662 |         ret = devm_clk_rate_exclusive_get(dev, priv->clk);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |               clk_rate_exclusive_get
   cc1: some warnings being treated as errors


vim +662 drivers/pwm/pwm-stm32.c

   627	
   628	static int stm32_pwm_probe(struct platform_device *pdev)
   629	{
   630		struct device *dev = &pdev->dev;
   631		struct device_node *np = dev->of_node;
   632		struct stm32_timers *ddata = dev_get_drvdata(pdev->dev.parent);
   633		struct pwm_chip *chip;
   634		struct stm32_pwm *priv;
   635		unsigned int npwm, num_enabled;
   636		unsigned int i;
   637		int ret;
   638	
   639		npwm = stm32_pwm_detect_channels(ddata->regmap, &num_enabled);
   640	
   641		chip = devm_pwmchip_alloc(dev, npwm, sizeof(*priv));
   642		if (IS_ERR(chip))
   643			return PTR_ERR(chip);
   644		priv = to_stm32_pwm_dev(chip);
   645	
   646		mutex_init(&priv->lock);
   647		priv->regmap = ddata->regmap;
   648		priv->clk = ddata->clk;
   649		priv->max_arr = ddata->max_arr;
   650	
   651		if (!priv->regmap || !priv->clk)
   652			return dev_err_probe(dev, -EINVAL, "Failed to get %s\n",
   653					     priv->regmap ? "clk" : "regmap");
   654	
   655		ret = stm32_pwm_probe_breakinputs(priv, np);
   656		if (ret)
   657			return dev_err_probe(dev, ret,
   658					     "Failed to configure breakinputs\n");
   659	
   660		stm32_pwm_detect_complementary(priv);
   661	
 > 662		ret = devm_clk_rate_exclusive_get(dev, priv->clk);
   663		if (ret)
   664			return dev_err_probe(dev, ret, "Failed to lock clock\n");
   665	
   666		/*
   667		 * With the clk running with not more than 1 GHz the calculations in
   668		 * .apply() won't overflow.
   669		 */
   670		if (clk_get_rate(priv->clk) > 1000000000)
   671			return dev_err_probe(dev, -EINVAL, "Failed to lock clock\n");
   672	
   673		chip->ops = &stm32pwm_ops;
   674	
   675		/* Initialize clock refcount to number of enabled PWM channels. */
   676		for (i = 0; i < num_enabled; i++)
   677			clk_enable(priv->clk);
   678	
   679		ret = devm_pwmchip_add(dev, chip);
   680		if (ret < 0)
   681			return dev_err_probe(dev, ret,
   682					     "Failed to register pwmchip\n");
   683	
   684		platform_set_drvdata(pdev, chip);
   685	
   686		return 0;
   687	}
   688	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get()
  2024-03-26 19:39 [linux-next:master 1141/1756] drivers/pwm/pwm-stm32.c:662:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'? kernel test robot
@ 2024-03-27  7:33 ` Uwe Kleine-König
  2024-03-28 22:35   ` Stephen Boyd
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2024-03-27  7:33 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Russell King (Oracle),
	linux-clk, linux-kernel, oe-kbuild-all, kernel test robot

To be able to compile drivers using devm_clk_rate_exclusive_get() also
on platforms without the common clk framework, add a dummy
implementation that does the same as clk_rate_exclusive_get() in that
case (i.e. nothing).

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/
Fixes: b0cde62e4c54 ("clk: Add a devm variant of clk_rate_exclusive_get()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 include/linux/clk.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/clk.h b/include/linux/clk.h
index 00623f4de5e1..0fa56d672532 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -286,6 +286,11 @@ static inline int clk_rate_exclusive_get(struct clk *clk)
 	return 0;
 }
 
+static inline int devm_clk_rate_exclusive_get(struct device *dev, struct clk *clk)
+{
+	return 0;
+}
+
 static inline void clk_rate_exclusive_put(struct clk *clk) {}
 
 #endif

base-commit: 4cece764965020c22cff7665b18a012006359095
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get()
  2024-03-27  7:33 ` [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get() Uwe Kleine-König
@ 2024-03-28 22:35   ` Stephen Boyd
  2024-04-12 20:49     ` Uwe Kleine-König
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2024-03-28 22:35 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Russell King, linux-clk, linux-kernel, oe-kbuild-all, kernel test robot

Quoting Uwe Kleine-König (2024-03-27 00:33:10)
> To be able to compile drivers using devm_clk_rate_exclusive_get() also
> on platforms without the common clk framework, add a dummy
> implementation that does the same as clk_rate_exclusive_get() in that
> case (i.e. nothing).
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/
> Fixes: b0cde62e4c54 ("clk: Add a devm variant of clk_rate_exclusive_get()")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

Applied to clk-fixes

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get()
  2024-03-28 22:35   ` Stephen Boyd
@ 2024-04-12 20:49     ` Uwe Kleine-König
  2024-04-19 20:00       ` Uwe Kleine-König
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2024-04-12 20:49 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Russell King, linux-clk, linux-kernel, oe-kbuild-all, kernel test robot

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

Hello Stephen,

On Thu, Mar 28, 2024 at 03:35:57PM -0700, Stephen Boyd wrote:
> Quoting Uwe Kleine-König (2024-03-27 00:33:10)
> > To be able to compile drivers using devm_clk_rate_exclusive_get() also
> > on platforms without the common clk framework, add a dummy
> > implementation that does the same as clk_rate_exclusive_get() in that
> > case (i.e. nothing).
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/
> > Fixes: b0cde62e4c54 ("clk: Add a devm variant of clk_rate_exclusive_get()")
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> 
> Applied to clk-fixes

I assume that means it will be sent to Linus before 6.9? That would be
great because I want to make use of this function in some drivers and
the build bots nag about my for-next branch that in some configurations
this function is missing.

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get()
  2024-04-12 20:49     ` Uwe Kleine-König
@ 2024-04-19 20:00       ` Uwe Kleine-König
  2024-04-19 22:20         ` Stephen Boyd
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2024-04-19 20:00 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Russell King, linux-clk, linux-kernel, oe-kbuild-all,
	kernel test robot, kernel

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

Hello Stephen,

On Fri, Apr 12, 2024 at 10:49:35PM +0200, Uwe Kleine-König wrote:
> On Thu, Mar 28, 2024 at 03:35:57PM -0700, Stephen Boyd wrote:
> > Quoting Uwe Kleine-König (2024-03-27 00:33:10)
> > > To be able to compile drivers using devm_clk_rate_exclusive_get() also
> > > on platforms without the common clk framework, add a dummy
> > > implementation that does the same as clk_rate_exclusive_get() in that
> > > case (i.e. nothing).
> > > 
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/
> > > Fixes: b0cde62e4c54 ("clk: Add a devm variant of clk_rate_exclusive_get()")
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > 
> > Applied to clk-fixes
> 
> I assume that means it will be sent to Linus before 6.9? That would be
> great because I want to make use of this function in some drivers and
> the build bots nag about my for-next branch that in some configurations
> this function is missing.

Gentle ping. I'd like to get the patches I intend to send to Linus for
v6.10-rc1 into shape. To have these unmodified in my for-next branch for
some time it would be great to know your plans for the clk-fixes branch. 
Alternatively: Can I expect the commit not to be changed any more and
pull it into my pwm tree?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get()
  2024-04-19 20:00       ` Uwe Kleine-König
@ 2024-04-19 22:20         ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2024-04-19 22:20 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Russell King, linux-clk, linux-kernel, oe-kbuild-all,
	kernel test robot, kernel

Quoting Uwe Kleine-König (2024-04-19 13:00:19)
> Hello Stephen,
> 
> On Fri, Apr 12, 2024 at 10:49:35PM +0200, Uwe Kleine-K�nig wrote:
> > On Thu, Mar 28, 2024 at 03:35:57PM -0700, Stephen Boyd wrote:
> > > Quoting Uwe Kleine-K�nig (2024-03-27 00:33:10)
> > > > To be able to compile drivers using devm_clk_rate_exclusive_get() also
> > > > on platforms without the common clk framework, add a dummy
> > > > implementation that does the same as clk_rate_exclusive_get() in that
> > > > case (i.e. nothing).
> > > > 
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > Closes: https://lore.kernel.org/oe-kbuild-all/202403270305.ydvX9xq1-lkp@intel.com/
> > > > Fixes: b0cde62e4c54 ("clk: Add a devm variant of clk_rate_exclusive_get()")
> > > > Signed-off-by: Uwe Kleine-K�nig <u.kleine-koenig@pengutronix.de>
> > > > ---
> > > 
> > > Applied to clk-fixes
> > 
> > I assume that means it will be sent to Linus before 6.9? That would be
> > great because I want to make use of this function in some drivers and
> > the build bots nag about my for-next branch that in some configurations
> > this function is missing.

Yes.

> 
> Gentle ping. I'd like to get the patches I intend to send to Linus for
> v6.10-rc1 into shape. To have these unmodified in my for-next branch for
> some time it would be great to know your plans for the clk-fixes branch. 
> Alternatively: Can I expect the commit not to be changed any more and
> pull it into my pwm tree?
> 

clk-fixes is sent to Linus during the rc cycle. I'm sending a PR today.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-19 22:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 19:39 [linux-next:master 1141/1756] drivers/pwm/pwm-stm32.c:662:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'? kernel test robot
2024-03-27  7:33 ` [PATCH] clk: Provide !COMMON_CLK dummy for devm_clk_rate_exclusive_get() Uwe Kleine-König
2024-03-28 22:35   ` Stephen Boyd
2024-04-12 20:49     ` Uwe Kleine-König
2024-04-19 20:00       ` Uwe Kleine-König
2024-04-19 22:20         ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.