public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [ukleinek:pwm/for-nexxt 26/26] drivers/pwm/pwm-apple.c:125:8: error: call to undeclared function 'devm_clk_rate_exclusive_get'; ISO C99 and later do not support implicit function declarations
@ 2024-03-31 19:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-31 19:00 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: llvm, 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: hexagon-randconfig-002-20240331 (https://download.01.org/0day-ci/archive/20240401/202404010249.YO0QV41t-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 546dc2245ffc4cccd0b05b58b7a5955e355a3b27)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240401/202404010249.YO0QV41t-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/202404010249.YO0QV41t-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/pwm/pwm-apple.c:19:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     547 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     560 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/pwm/pwm-apple.c:19:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     573 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/pwm/pwm-apple.c:19:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     584 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     594 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     604 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
>> drivers/pwm/pwm-apple.c:125:8: error: call to undeclared function 'devm_clk_rate_exclusive_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     125 |         ret = devm_clk_rate_exclusive_get(&pdev->dev, clk);
         |               ^
   drivers/pwm/pwm-apple.c:125:8: note: did you mean 'clk_rate_exclusive_get'?
   include/linux/clk.h:284:19: note: 'clk_rate_exclusive_get' declared here
     284 | static inline int clk_rate_exclusive_get(struct clk *clk)
         |                   ^
   6 warnings and 1 error generated.


vim +/devm_clk_rate_exclusive_get +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 19:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-31 19:00 [ukleinek:pwm/for-nexxt 26/26] drivers/pwm/pwm-apple.c:125:8: error: call to undeclared function 'devm_clk_rate_exclusive_get'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox