oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [conor:pwm-dev-v15 4/9] drivers/pwm/pwm-microchip-core.c:430:65: error: expected ';' before 'if'
@ 2023-03-24 20:40 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-24 20:40 UTC (permalink / raw)
  To: Conor Dooley; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git pwm-dev-v15
head:   f675a783c2fc465c5fb8f52191d740467e265b89
commit: 1d5bcc2680eafb15c14856a00fbb92b40e26cba1 [4/9] report pwmchip_add() failures
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20230325/202303250450.otHWagcB-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/commit/?id=1d5bcc2680eafb15c14856a00fbb92b40e26cba1
        git remote add conor https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git
        git fetch --no-tags conor pwm-dev-v15
        git checkout 1d5bcc2680eafb15c14856a00fbb92b40e26cba1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303250450.otHWagcB-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pwm/pwm-microchip-core.c: In function 'mchp_core_pwm_probe':
>> drivers/pwm/pwm-microchip-core.c:430:65: error: expected ';' before 'if'
     430 |         ret = devm_pwmchip_add(&pdev->dev, &mchp_core_pwm->chip)
         |                                                                 ^
         |                                                                 ;
     431 |         if (ret)
         |         ~~                                                       
   drivers/pwm/pwm-microchip-core.c:398:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
     398 |         int ret;
         |             ^~~
   drivers/pwm/pwm-microchip-core.c:435:1: error: control reaches end of non-void function [-Werror=return-type]
     435 | }
         | ^
   cc1: some warnings being treated as errors


vim +430 drivers/pwm/pwm-microchip-core.c

   393	
   394	static int mchp_core_pwm_probe(struct platform_device *pdev)
   395	{
   396		struct mchp_core_pwm_chip *mchp_core_pwm;
   397		struct resource *regs;
   398		int ret;
   399	
   400		mchp_core_pwm = devm_kzalloc(&pdev->dev, sizeof(*mchp_core_pwm), GFP_KERNEL);
   401		if (!mchp_core_pwm)
   402			return -ENOMEM;
   403	
   404		mchp_core_pwm->base = devm_platform_get_and_ioremap_resource(pdev, 0, &regs);
   405		if (IS_ERR(mchp_core_pwm->base))
   406			return PTR_ERR(mchp_core_pwm->base);
   407	
   408		mchp_core_pwm->clk = devm_clk_get_enabled(&pdev->dev, NULL);
   409		if (IS_ERR(mchp_core_pwm->clk))
   410			return dev_err_probe(&pdev->dev, PTR_ERR(mchp_core_pwm->clk),
   411					     "failed to get PWM clock\n");
   412	
   413		if (of_property_read_u32(pdev->dev.of_node, "microchip,sync-update-mask",
   414					 &mchp_core_pwm->sync_update_mask))
   415			mchp_core_pwm->sync_update_mask = 0;
   416	
   417		mutex_init(&mchp_core_pwm->lock);
   418	
   419		mchp_core_pwm->chip.dev = &pdev->dev;
   420		mchp_core_pwm->chip.ops = &mchp_core_pwm_ops;
   421		mchp_core_pwm->chip.npwm = 16;
   422	
   423		mchp_core_pwm->channel_enabled = readb_relaxed(mchp_core_pwm->base + MCHPCOREPWM_EN(0));
   424		mchp_core_pwm->channel_enabled |=
   425			readb_relaxed(mchp_core_pwm->base + MCHPCOREPWM_EN(1)) << 8;
   426	
   427		writel_relaxed(1U, mchp_core_pwm->base + MCHPCOREPWM_SYNC_UPD);
   428		mchp_core_pwm->update_timestamp = ktime_get();
   429	
 > 430		ret = devm_pwmchip_add(&pdev->dev, &mchp_core_pwm->chip)
   431		if (ret)
   432			return dev_err_probe(&pdev->dev, ret, "Failed to add pwmchip\n")
   433	
   434		return 0;
   435	}
   436	

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

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

only message in thread, other threads:[~2023-03-24 20:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 20:40 [conor:pwm-dev-v15 4/9] drivers/pwm/pwm-microchip-core.c:430:65: error: expected ';' before 'if' 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;
as well as URLs for NNTP newsgroup(s).