public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafael V. Volkmer" <rafael.v.volkmer@gmail.com>, ukleinek@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-pwm@vger.kernel.org, rafael.v.volkmer@gmail.com
Subject: Re: [PATCH] pwm: tiehrpwm: ensures that state.enabled is synchronized during .probe()
Date: Fri, 29 Nov 2024 19:30:51 +0800	[thread overview]
Message-ID: <202411291940.6T4OMy3k-lkp@intel.com> (raw)
In-Reply-To: <20241129034334.27203-1-rafael.v.volkmer@gmail.com>

Hi Rafael,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.12 next-20241128]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rafael-V-Volkmer/pwm-tiehrpwm-ensures-that-state-enabled-is-synchronized-during-probe/20241129-114649
base:   linus/master
patch link:    https://lore.kernel.org/r/20241129034334.27203-1-rafael.v.volkmer%40gmail.com
patch subject: [PATCH] pwm: tiehrpwm: ensures that state.enabled is synchronized during .probe()
config: alpha-randconfig-r053-20241129 (https://download.01.org/0day-ci/archive/20241129/202411291940.6T4OMy3k-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411291940.6T4OMy3k-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/202411291940.6T4OMy3k-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pwm/pwm-tiehrpwm.c: In function 'ehrpwm_pwm_probe':
>> drivers/pwm/pwm-tiehrpwm.c:642:32: error: 'struct ehrpwm_pwm_chip' has no member named 'chip'
     642 |         ehrpwm_get_hw_state(&pc->chip, &pc->chip.pwms[0], &state);
         |                                ^~
   drivers/pwm/pwm-tiehrpwm.c:642:43: error: 'struct ehrpwm_pwm_chip' has no member named 'chip'
     642 |         ehrpwm_get_hw_state(&pc->chip, &pc->chip.pwms[0], &state);
         |                                           ^~
>> drivers/pwm/pwm-tiehrpwm.c:642:60: error: 'state' undeclared (first use in this function); did you mean 'statx'?
     642 |         ehrpwm_get_hw_state(&pc->chip, &pc->chip.pwms[0], &state);
         |                                                            ^~~~~
         |                                                            statx
   drivers/pwm/pwm-tiehrpwm.c:642:60: note: each undeclared identifier is reported only once for each function it appears in
   drivers/pwm/pwm-tiehrpwm.c:664:27: error: 'struct ehrpwm_pwm_chip' has no member named 'chip'
     664 |         pwmchip_remove(&pc->chip);
         |                           ^~


vim +642 drivers/pwm/pwm-tiehrpwm.c

   584	
   585	static int ehrpwm_pwm_probe(struct platform_device *pdev)
   586	{
   587		struct device_node *np = pdev->dev.of_node;
   588		struct ehrpwm_pwm_chip *pc;
   589		struct pwm_chip *chip;
   590		bool tbclk_enabled;
   591		struct clk *clk;
   592		int ret;
   593	
   594		chip = devm_pwmchip_alloc(&pdev->dev, NUM_PWM_CHANNEL, sizeof(*pc));
   595		if (IS_ERR(chip))
   596			return PTR_ERR(chip);
   597		pc = to_ehrpwm_pwm_chip(chip);
   598	
   599		clk = devm_clk_get(&pdev->dev, "fck");
   600		if (IS_ERR(clk)) {
   601			if (of_device_is_compatible(np, "ti,am33xx-ecap")) {
   602				dev_warn(&pdev->dev, "Binding is obsolete.\n");
   603				clk = devm_clk_get(pdev->dev.parent, "fck");
   604			}
   605		}
   606	
   607		if (IS_ERR(clk))
   608			return dev_err_probe(&pdev->dev, PTR_ERR(clk), "Failed to get fck\n");
   609	
   610		pc->clk_rate = clk_get_rate(clk);
   611		if (!pc->clk_rate) {
   612			dev_err(&pdev->dev, "failed to get clock rate\n");
   613			return -EINVAL;
   614		}
   615	
   616		chip->ops = &ehrpwm_pwm_ops;
   617	
   618		pc->mmio_base = devm_platform_ioremap_resource(pdev, 0);
   619		if (IS_ERR(pc->mmio_base))
   620			return PTR_ERR(pc->mmio_base);
   621	
   622		/* Acquire tbclk for Time Base EHRPWM submodule */
   623		pc->tbclk = devm_clk_get(&pdev->dev, "tbclk");
   624		if (IS_ERR(pc->tbclk))
   625			return dev_err_probe(&pdev->dev, PTR_ERR(pc->tbclk), "Failed to get tbclk\n");
   626	
   627		ret = clk_prepare(pc->tbclk);
   628		if (ret < 0) {
   629			dev_err(&pdev->dev, "clk_prepare() failed: %d\n", ret);
   630			return ret;
   631		}
   632	
   633		ret = pwmchip_add(chip);
   634		if (ret < 0) {
   635			dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
   636			goto err_clk_unprepare;
   637		}
   638	
   639		platform_set_drvdata(pdev, chip);
   640		pm_runtime_enable(&pdev->dev);
   641	
 > 642		ehrpwm_get_hw_state(&pc->chip, &pc->chip.pwms[0], &state);
   643	
   644		if(state.enabled == true) {
   645			ret = clk_prepare_enable(pc->tbclk);
   646			if (ret) {	
   647				dev_err(&pdev->dev, "clk_prepare_enable() failed: %d\n", ret);
   648				goto err_pwmchip_remove;
   649			}
   650			
   651			tbclk_enabled = true;
   652	
   653			ret = pm_runtime_get_sync(&pdev->dev);
   654			if(ret < 0) {
   655				dev_err(&pdev->dev, "pm_runtime_get_sync() failed: %d\n", ret);
   656				clk_disable_unprepare(pc->tbclk);
   657				goto err_pwmchip_remove;
   658			}
   659		}
   660	
   661		return 0;
   662	
   663	err_pwmchip_remove:
   664		pwmchip_remove(&pc->chip);
   665	err_clk_unprepare:
   666		if(tbclk_enabled)
   667			clk_unprepare(pc->tbclk);
   668	
   669		return ret;
   670	}
   671	

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

  reply	other threads:[~2024-11-29 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 21:24 [PATCH 2/2] pwm: correct pwm->state.enabled handling to allow fops control Rafael V. Volkmer
2024-11-27  8:56 ` Uwe Kleine-König
2024-11-27 22:26   ` [PATCH v2] pwm: improve state handling in ehrpwm driver Rafael V. Volkmer
2024-11-28  9:59     ` Uwe Kleine-König
2024-11-29  3:43       ` [PATCH] pwm: tiehrpwm: ensures that state.enabled is synchronized during .probe() Rafael V. Volkmer
2024-11-29 11:30         ` kernel test robot [this message]
2024-11-29 18:40         ` kernel test robot

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=202411291940.6T4OMy3k-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael.v.volkmer@gmail.com \
    --cc=ukleinek@kernel.org \
    /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