From: kernel test robot <lkp@intel.com>
To: Samuel Holland <samuel@sholland.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Lee Jones <lee@kernel.org>
Subject: [linux-next:master 2589/2998] drivers/leds/leds-sun50i-a100.c:309:12: error: call to __compiletime_assert_280 declared with 'error' attribute: FIELD_PREP: value too large for the field
Date: Mon, 27 Nov 2023 11:11:15 +0800 [thread overview]
Message-ID: <202311270852.wLjVrXUy-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8c9660f6515396aba78d1168d2e17951d653ebf2
commit: 090a25ad97983720f52b11d9c5a8d1a446217c1d [2589/2998] leds: sun50i-a100: New driver for the A100 LED controller
config: powerpc64-randconfig-r123-20231126 (https://download.01.org/0day-ci/archive/20231127/202311270852.wLjVrXUy-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce: (https://download.01.org/0day-ci/archive/20231127/202311270852.wLjVrXUy-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/202311270852.wLjVrXUy-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/leds/leds-sun50i-a100.c:309:12: error: call to __compiletime_assert_280 declared with 'error' attribute: FIELD_PREP: value too large for the field
control = FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T1H, timing->t1h_ns / cycle_ns) |
^
include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^
include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:54:1: note: expanded from here
__compiletime_assert_280
^
1 error generated.
vim +/error +309 drivers/leds/leds-sun50i-a100.c
301
302 static void sun50i_a100_ledc_set_timing(struct sun50i_a100_ledc *priv)
303 {
304 const struct sun50i_a100_ledc_timing *timing = &priv->timing;
305 unsigned long mod_freq = clk_get_rate(priv->mod_clk);
306 u32 cycle_ns = NSEC_PER_SEC / mod_freq;
307 u32 control;
308
> 309 control = FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T1H, timing->t1h_ns / cycle_ns) |
310 FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T1L, timing->t1l_ns / cycle_ns) |
311 FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T0H, timing->t0h_ns / cycle_ns) |
312 FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T0L, timing->t0l_ns / cycle_ns);
313 writel(control, priv->base + LEDC_T01_TIMING_CTRL_REG);
314
315 control = FIELD_PREP(LEDC_RESET_TIMING_CTRL_REG_TR, timing->treset_ns / cycle_ns) |
316 FIELD_PREP(LEDC_RESET_TIMING_CTRL_REG_LED_NUM, priv->max_addr);
317 writel(control, priv->base + LEDC_RESET_TIMING_CTRL_REG);
318 }
319
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-11-27 3:11 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=202311270852.wLjVrXUy-lkp@intel.com \
--to=lkp@intel.com \
--cc=lee@kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=samuel@sholland.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