All of lore.kernel.org
 help / color / mirror / Atom feed
* [ukleinek:pwm/for-nexxt 26/26] drivers/pwm/pwm-apple.c:125:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'?
@ 2024-03-31 18:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-31 18:39 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-nexxt
head:   0bac6aced1c550ec9628e0fa5d98036c6cbc51b4
commit: 0bac6aced1c550ec9628e0fa5d98036c6cbc51b4 [26/26] WIP: pwm: Fix clk rate using clk_rate_exclusive_get()
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240401/202404010229.4zSY98zS-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/20240401/202404010229.4zSY98zS-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/202404010229.4zSY98zS-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pwm/pwm-apple.c: In function 'apple_pwm_probe':
>> drivers/pwm/pwm-apple.c:125:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'? [-Werror=implicit-function-declaration]
     125 |         ret = devm_clk_rate_exclusive_get(&pdev->dev, clk);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |               clk_rate_exclusive_get
   cc1: some warnings being treated as errors
--
   drivers/pwm/pwm-lpc18xx-sct.c: In function 'lpc18xx_pwm_probe':
>> drivers/pwm/pwm-lpc18xx-sct.c:369:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'? [-Werror=implicit-function-declaration]
     369 |         ret = devm_clk_rate_exclusive_get(&pdev->dev, lpc18xx_pwm->pwm_clk);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |               clk_rate_exclusive_get
   cc1: some warnings being treated as errors


vim +125 drivers/pwm/pwm-apple.c

   102	
   103	static int apple_pwm_probe(struct platform_device *pdev)
   104	{
   105		struct pwm_chip *chip;
   106		struct apple_pwm *fpwm;
   107		struct clk *clk;
   108		int ret;
   109	
   110		chip = devm_pwmchip_alloc(&pdev->dev, 1, sizeof(*fpwm));
   111		if (IS_ERR(chip))
   112			return PTR_ERR(chip);
   113	
   114		fpwm = to_apple_pwm(chip);
   115	
   116		fpwm->base = devm_platform_ioremap_resource(pdev, 0);
   117		if (IS_ERR(fpwm->base))
   118			return PTR_ERR(fpwm->base);
   119	
   120		clk = devm_clk_get_enabled(&pdev->dev, NULL);
   121		if (IS_ERR(clk))
   122			return dev_err_probe(&pdev->dev, PTR_ERR(clk), "unable to get the clock");
   123	
   124		/* Ensure that clk doesn't change behind our back */
 > 125		ret = devm_clk_rate_exclusive_get(&pdev->dev, clk);
   126		if (ret)
   127			return dev_err_probe(&pdev->dev, ret,
   128					     "unable to lock clock rate");
   129	
   130		/*
   131		 * Uses the 24MHz system clock on all existing devices, can only
   132		 * happen if the device tree is broken
   133		 *
   134		 * This check is done to prevent an overflow in .apply
   135		 */
   136		fpwm->clkrate = clk_get_rate(clk);
   137		if (fpwm->clkrate > NSEC_PER_SEC)
   138			return dev_err_probe(&pdev->dev, -EINVAL, "pwm clock out of range");
   139	
   140		chip->ops = &apple_pwm_ops;
   141	
   142		ret = devm_pwmchip_add(&pdev->dev, chip);
   143		if (ret < 0)
   144			return dev_err_probe(&pdev->dev, ret, "unable to add pwm chip");
   145	
   146		return 0;
   147	}
   148	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-31 18:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-31 18:39 [ukleinek:pwm/for-nexxt 26/26] drivers/pwm/pwm-apple.c:125:15: error: implicit declaration of function 'devm_clk_rate_exclusive_get'; did you mean 'clk_rate_exclusive_get'? kernel test robot

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.