From: kernel test robot <lkp@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [linux-next:master 14246/14442] drivers/pwm/pwm-rcar.c:114:12: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations
Date: Thu, 3 Apr 2025 19:55:59 +0800 [thread overview]
Message-ID: <202504032210.lrHoeR64-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f0a16f5363325cc8d9382471cdc7b654c53254c9
commit: edd549f4956be84ebd6a3900975544adeb0f3b50 [14246/14442] pwm: rcar: Improve register calculation
config: powerpc64-randconfig-003-20250403 (https://download.01.org/0day-ci/archive/20250403/202504032210.lrHoeR64-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 7eccafc3c84606587a175c0a8c1ebea6e4fb21cd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250403/202504032210.lrHoeR64-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/202504032210.lrHoeR64-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/pwm/pwm-rcar.c:114:12: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
114 | if (tmp > FIELD_MAX(RCAR_PWMCNT_CYC0_MASK))
| ^
>> drivers/pwm/pwm-rcar.c:117:8: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
117 | cyc = FIELD_PREP(RCAR_PWMCNT_CYC0_MASK, tmp);
| ^
2 errors generated.
vim +/FIELD_MAX +114 drivers/pwm/pwm-rcar.c
104
105 static int rcar_pwm_set_counter(struct rcar_pwm_chip *rp, int div, u64 duty_ns,
106 u64 period_ns)
107 {
108 unsigned long long tmp;
109 unsigned long clk_rate = clk_get_rate(rp->clk);
110 u32 cyc, ph;
111
112 /* div <= 24 == RCAR_PWM_MAX_DIVISION, so the shift doesn't overflow. */
113 tmp = mul_u64_u64_div_u64(period_ns, clk_rate, (u64)NSEC_PER_SEC << div);
> 114 if (tmp > FIELD_MAX(RCAR_PWMCNT_CYC0_MASK))
115 tmp = FIELD_MAX(RCAR_PWMCNT_CYC0_MASK);
116
> 117 cyc = FIELD_PREP(RCAR_PWMCNT_CYC0_MASK, tmp);
118
119 tmp = mul_u64_u64_div_u64(duty_ns, clk_rate, (u64)NSEC_PER_SEC << div);
120 if (tmp > FIELD_MAX(RCAR_PWMCNT_PH0_MASK))
121 tmp = FIELD_MAX(RCAR_PWMCNT_PH0_MASK);
122 ph = FIELD_PREP(RCAR_PWMCNT_PH0_MASK, tmp);
123
124 /* Avoid prohibited setting */
125 if (cyc == 0 || ph == 0)
126 return -EINVAL;
127
128 rcar_pwm_write(rp, cyc | ph, RCAR_PWMCNT);
129
130 return 0;
131 }
132
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-03 11:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202504032210.lrHoeR64-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=u.kleine-koenig@baylibre.com \
/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