Linux PWM subsystem development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Biju Das" <biju.das.jz@bp.renesas.com>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>
Cc: oe-kbuild-all@lists.linux.dev,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-pwm@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v23 3/4] pwm: Add support for RZ/G2L GPT
Date: Wed, 18 Dec 2024 23:58:18 +0800	[thread overview]
Message-ID: <202412182358.9wma1UUE-lkp@intel.com> (raw)
In-Reply-To: <20241217132921.169640-4-biju.das.jz@bp.renesas.com>

Hi Biju,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 483082d78a092a3c1f343a76a2edb196069b4092]

url:    https://github.com/intel-lab-lkp/linux/commits/Biju-Das/dt-bindings-pwm-Add-RZ-G2L-GPT-binding/20241217-213809
base:   483082d78a092a3c1f343a76a2edb196069b4092
patch link:    https://lore.kernel.org/r/20241217132921.169640-4-biju.das.jz%40bp.renesas.com
patch subject: [PATCH v23 3/4] pwm: Add support for RZ/G2L GPT
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20241218/202412182358.9wma1UUE-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241218/202412182358.9wma1UUE-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/202412182358.9wma1UUE-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/pwm/pwm-rzg2l-gpt.c: In function 'rzg2l_gpt_probe':
>> drivers/pwm/pwm-rzg2l-gpt.c:374:13: warning: unused variable 'i' [-Wunused-variable]
     374 |         u32 i;
         |             ^


vim +/i +374 drivers/pwm/pwm-rzg2l-gpt.c

   364	
   365	static int rzg2l_gpt_probe(struct platform_device *pdev)
   366	{
   367		struct rzg2l_gpt_chip *rzg2l_gpt;
   368		struct device *dev = &pdev->dev;
   369		struct reset_control *rstc;
   370		struct pwm_chip *chip;
   371		unsigned long rate;
   372		struct clk *clk;
   373		int ret;
 > 374		u32 i;
   375	
   376		chip = devm_pwmchip_alloc(dev, RZG2L_MAX_PWM_CHANNELS, sizeof(*rzg2l_gpt));
   377		if (IS_ERR(chip))
   378			return PTR_ERR(chip);
   379		rzg2l_gpt = to_rzg2l_gpt_chip(chip);
   380	
   381		rzg2l_gpt->mmio = devm_platform_ioremap_resource(pdev, 0);
   382		if (IS_ERR(rzg2l_gpt->mmio))
   383			return PTR_ERR(rzg2l_gpt->mmio);
   384	
   385		rstc = devm_reset_control_get_exclusive_deasserted(dev, NULL);
   386		if (IS_ERR(rstc))
   387			return dev_err_probe(dev, PTR_ERR(rstc), "Cannot deassert reset control\n");
   388	
   389		clk = devm_clk_get_enabled(dev, NULL);
   390		if (IS_ERR(clk))
   391			return dev_err_probe(dev, PTR_ERR(clk), "Cannot get clock\n");
   392	
   393		ret = devm_clk_rate_exclusive_get(dev, clk);
   394		if (ret)
   395			return ret;
   396	
   397		rate = clk_get_rate(clk);
   398		if (!rate)
   399			return dev_err_probe(dev, -EINVAL, "The gpt clk rate is 0");
   400	
   401		/*
   402		 * Refuse clk rates > 1 GHz to prevent overflow later for computing
   403		 * period and duty cycle.
   404		 */
   405		if (rate > NSEC_PER_SEC)
   406			return dev_err_probe(dev, -EINVAL, "The gpt clk rate is > 1GHz");
   407	
   408		/*
   409		 * Rate is in MHz and is always integer for peripheral clk
   410		 * 2^32 * 2^10 (prescalar) * 10^6 (rate_khz) < 2^64
   411		 * So make sure rate is multiple of 1000.
   412		 */
   413		rzg2l_gpt->rate_khz = rate / KILO;
   414		if (rzg2l_gpt->rate_khz * KILO != rate)
   415			return dev_err_probe(dev, -EINVAL, "Rate is not multiple of 1000");
   416	
   417		mutex_init(&rzg2l_gpt->lock);
   418	
   419		chip->ops = &rzg2l_gpt_ops;
   420		ret = devm_pwmchip_add(dev, chip);
   421		if (ret)
   422			return dev_err_probe(dev, ret, "Failed to add PWM chip\n");
   423	
   424		return 0;
   425	}
   426	

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

  reply	other threads:[~2024-12-18 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 13:29 [PATCH v23 0/4] Add support for RZ/G2L GPT Biju Das
2024-12-17 13:29 ` [PATCH v23 1/4] dt-bindings: pwm: Add RZ/G2L GPT binding Biju Das
2024-12-17 13:29 ` [PATCH v23 2/4] dt-bindings: pwm: rzg2l-gpt: Document renesas,poegs property Biju Das
2024-12-17 13:29 ` [PATCH v23 3/4] pwm: Add support for RZ/G2L GPT Biju Das
2024-12-18 15:58   ` kernel test robot [this message]
2025-01-08 14:13     ` Biju Das
2025-01-09  9:23       ` Uwe Kleine-König
2025-01-09  9:32         ` Biju Das
2025-02-21  8:21           ` Biju Das
2025-02-21  9:08           ` Uwe Kleine-König
2025-02-26  9:20             ` Biju Das
2024-12-17 13:29 ` [PATCH v23 4/4] pwm: rzg2l-gpt: Add support for gpt linking with poeg Biju Das

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=202412182358.9wma1UUE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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