From: kernel test robot <lkp@intel.com>
To: "Christian Marangi" <ansuelsmth@gmail.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org,
"Andy Shevchenko" <andriy.shevchenko@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Benjamin Larsson <benjamin.larsson@genexis.eu>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Christian Marangi <ansuelsmth@gmail.com>
Subject: Re: [PATCH v17] pwm: airoha: Add support for EN7581 SoC
Date: Fri, 27 Jun 2025 03:54:20 +0800 [thread overview]
Message-ID: <202506270344.Sx9MtDt4-lkp@intel.com> (raw)
In-Reply-To: <20250625194919.94214-1-ansuelsmth@gmail.com>
Hi Christian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.16-rc3 next-20250626]
[cannot apply to thierry-reding-pwm/for-next]
[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/Christian-Marangi/pwm-airoha-Add-support-for-EN7581-SoC/20250626-035111
base: linus/master
patch link: https://lore.kernel.org/r/20250625194919.94214-1-ansuelsmth%40gmail.com
patch subject: [PATCH v17] pwm: airoha: Add support for EN7581 SoC
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250627/202506270344.Sx9MtDt4-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250627/202506270344.Sx9MtDt4-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/202506270344.Sx9MtDt4-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pwm/pwm-airoha.c:498:6: warning: variable 'period_ns' is uninitialized when used here [-Wuninitialized]
498 | if (period_ns < AIROHA_PWM_PERIOD_TICK_NS)
| ^~~~~~~~~
drivers/pwm/pwm-airoha.c:486:15: note: initialize the variable 'period_ns' to silence this warning
486 | u32 period_ns, duty_ns;
| ^
| = 0
1 warning generated.
vim +/period_ns +498 drivers/pwm/pwm-airoha.c
480
481 static int airoha_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
482 const struct pwm_state *state)
483 {
484 struct airoha_pwm *pc = pwmchip_get_drvdata(chip);
485 u32 period_ticks, duty_ticks;
486 u32 period_ns, duty_ns;
487
488 if (!state->enabled) {
489 airoha_pwm_disable(pc, pwm);
490 return 0;
491 }
492
493 /* Only normal polarity is supported */
494 if (state->polarity == PWM_POLARITY_INVERSED)
495 return -EINVAL;
496
497 /* Exit early if period is less than minimum supported */
> 498 if (period_ns < AIROHA_PWM_PERIOD_TICK_NS)
499 return -EINVAL;
500
501 /* Clamp period to MAX supported value */
502 if (state->period > AIROHA_PWM_PERIOD_MAX_NS)
503 period_ns = AIROHA_PWM_PERIOD_MAX_NS;
504 else
505 period_ns = state->period;
506
507 /* Validate duty to configured period */
508 if (state->duty_cycle > period_ns)
509 duty_ns = period_ns;
510 else
511 duty_ns = state->duty_cycle;
512
513 /*
514 * Period goes at 4ns step, normalize it to check if we can
515 * share a generator.
516 */
517 period_ns = rounddown(period_ns, AIROHA_PWM_PERIOD_TICK_NS);
518
519 /*
520 * Duty is divided in 255 segment, normalize it to check if we
521 * can share a generator.
522 */
523 duty_ns = DIV_U64_ROUND_UP(duty_ns * AIROHA_PWM_DUTY_FULL,
524 AIROHA_PWM_DUTY_FULL);
525
526 /* Convert ns to ticks */
527 period_ticks = airoha_pwm_get_period_ticks_from_ns(period_ns);
528 duty_ticks = airoha_pwm_get_duty_ticks_from_ns(period_ns, duty_ns);
529
530 return airoha_pwm_config(pc, pwm, period_ticks, duty_ticks);
531 }
532
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-06-26 19:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 19:49 [PATCH v17] pwm: airoha: Add support for EN7581 SoC Christian Marangi
2025-06-26 13:54 ` Andy Shevchenko
2025-06-26 22:52 ` Christian Marangi
2025-06-27 4:15 ` Andy Shevchenko
2025-06-26 19:54 ` kernel test robot [this message]
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=202506270344.Sx9MtDt4-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=ansuelsmth@gmail.com \
--cc=benjamin.larsson@genexis.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lorenzo@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--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