From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: Re: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
Date: Wed, 26 Jul 2023 17:50:31 +0800 [thread overview]
Message-ID: <202307261759.cFMqbOSP-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: drivers/iio/adc/max11410.c:310:16: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
References: <a09512c8526b46759669d0b879144563@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
TO: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
TO: "'Christoph Hellwig'" <hch@infradead.org>
TO: "'Jason A. Donenfeld'" <Jason@zx2c4.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.5-rc3 next-20230726]
[cannot apply to next-20230725]
[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/David-Laight/minmax-Allow-min-max-clamp-if-the-arguments-have-the-same-signedness/20230725-204940
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/a09512c8526b46759669d0b879144563%40AcuMS.aculab.com
patch subject: [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness.
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
config: i386-randconfig-i062-20230725 (https://download.01.org/0day-ci/archive/20230726/202307261759.cFMqbOSP-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230726/202307261759.cFMqbOSP-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/r/202307261759.cFMqbOSP-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/max11410.c:310:16: sparse: sparse: bad integer constant expression
>> drivers/iio/adc/max11410.c:310:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(rate))(0) greater than high limit (typeof(rate))(max11410_sampling_len[MAX11410_FILTER_SINC4] - 1)"
--
>> drivers/gpu/drm/i915/gt/intel_rps.c:872:23: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:872:23: sparse: sparse: static assertion failed: "clamp() low limit rps->min_freq_softlimit greater than high limit rps->max_freq_softlimit"
drivers/gpu/drm/i915/gt/intel_rps.c:1194:33: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:1194:33: sparse: sparse: static assertion failed: "clamp() low limit (u32)(rps->min_freq) greater than high limit (u32)(rps->max_freq)"
drivers/gpu/drm/i915/gt/intel_rps.c:1874:20: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:1874:20: sparse: sparse: static assertion failed: "clamp() low limit (int)(min) greater than high limit (int)(max)"
drivers/gpu/drm/i915/gt/intel_rps.c:1961:20: sparse: sparse: bad integer constant expression
drivers/gpu/drm/i915/gt/intel_rps.c:1961:20: sparse: sparse: static assertion failed: "clamp() low limit rps->min_freq_softlimit greater than high limit rps->max_freq_softlimit"
drivers/gpu/drm/i915/gt/intel_rps.c:2467:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/gt/intel_rps.c:2467:15: sparse: sparse: static assertion failed: "clamp() low limit (int)(rps->min_freq_softlimit) greater than high limit (int)(rps->max_freq_softlimit)"
drivers/gpu/drm/i915/gt/intel_rps.c:2545:15: sparse: sparse: bad integer constant expression
drivers/gpu/drm/i915/gt/intel_rps.c:2545:15: sparse: sparse: static assertion failed: "clamp() low limit (int)(rps->min_freq_softlimit) greater than high limit (int)(rps->max_freq_softlimit)"
--
>> drivers/gpu/drm/i915/i915_hwmon.c:391:24: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/i915_hwmon.c:391:24: sparse: sparse: static assertion failed: "clamp() low limit (u64)(min) greater than high limit (u64)(max)"
--
drivers/gpu/drm/i915/display/intel_color.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/i915/display/intel_color.c:584:13: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_color.c:584:13: sparse: sparse: static assertion failed: "clamp() low limit -(s64)((((1UL))) << (int_bits + frac_bits - 1)) greater than high limit (s64)(((((1UL))) << (int_bits + frac_bits - 1)) - 1)"
drivers/gpu/drm/i915/display/intel_color.c:785:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_color.c:785:15: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
--
drivers/gpu/drm/i915/display/intel_backlight.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/i915/display/intel_backlight.c:47:22: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_backlight.c:47:22: sparse: sparse: static assertion failed: "clamp() low limit source_min greater than high limit source_max"
drivers/gpu/drm/i915/display/intel_backlight.c:69:20: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_backlight.c:69:20: sparse: sparse: static assertion failed: "clamp() low limit panel->backlight.min greater than high limit panel->backlight.max"
drivers/gpu/drm/i915/display/intel_backlight.c:1332:15: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_backlight.c:1332:15: sparse: sparse: static assertion failed: "clamp() low limit panel->backlight.pwm_level_min greater than high limit panel->backlight.pwm_level_max"
--
drivers/gpu/drm/i915/display/intel_dp_aux.c: note: in included file (through include/drm/drm_plane.h, include/drm/drm_crtc.h, include/drm/drm_atomic.h, ...):
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: bad integer constant expression
include/drm/drm_color_mgmt.h:52:16: sparse: sparse: static assertion failed: "clamp() low limit (typeof(val))(0) greater than high limit (typeof(val))(max)"
>> drivers/gpu/drm/i915/display/intel_dp_aux.c:480:39: sparse: sparse: bad integer constant expression
>> drivers/gpu/drm/i915/display/intel_dp_aux.c:480:39: sparse: sparse: static assertion failed: "clamp() low limit (int)(0) greater than high limit (int)(msg->size)"
vim +310 drivers/iio/adc/max11410.c
a44ef7c4609724 Ibrahim Tilki 2022-10-03 296
a44ef7c4609724 Ibrahim Tilki 2022-10-03 297 static ssize_t in_voltage_filter2_notch_center_show(struct device *dev,
a44ef7c4609724 Ibrahim Tilki 2022-10-03 298 struct device_attribute *devattr,
a44ef7c4609724 Ibrahim Tilki 2022-10-03 299 char *buf)
a44ef7c4609724 Ibrahim Tilki 2022-10-03 300 {
a44ef7c4609724 Ibrahim Tilki 2022-10-03 301 struct iio_dev *indio_dev = dev_get_drvdata(dev);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 302 struct max11410_state *state = iio_priv(indio_dev);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 303 int ret, reg, rate, filter;
a44ef7c4609724 Ibrahim Tilki 2022-10-03 304
a44ef7c4609724 Ibrahim Tilki 2022-10-03 305 ret = regmap_read(state->regmap, MAX11410_REG_FILTER, ®);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 306 if (ret)
a44ef7c4609724 Ibrahim Tilki 2022-10-03 307 return ret;
a44ef7c4609724 Ibrahim Tilki 2022-10-03 308
a44ef7c4609724 Ibrahim Tilki 2022-10-03 309 rate = FIELD_GET(MAX11410_FILTER_RATE_MASK, reg);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 @310 rate = clamp_val(rate, 0,
a44ef7c4609724 Ibrahim Tilki 2022-10-03 311 max11410_sampling_len[MAX11410_FILTER_SINC4] - 1);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 312 filter = max11410_sampling_rates[MAX11410_FILTER_SINC4][rate][0];
a44ef7c4609724 Ibrahim Tilki 2022-10-03 313
a44ef7c4609724 Ibrahim Tilki 2022-10-03 314 return sysfs_emit(buf, "%d\n", filter);
a44ef7c4609724 Ibrahim Tilki 2022-10-03 315 }
a44ef7c4609724 Ibrahim Tilki 2022-10-03 316
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-07-26 9:51 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 9:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-31 21:23 [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness kernel test robot
2023-07-31 20:41 kernel test robot
2023-07-31 20:20 kernel test robot
2023-07-30 1:38 kernel test robot
2023-07-30 1:08 kernel test robot
2023-07-29 3:54 kernel test robot
2023-07-29 2:41 kernel test robot
2023-07-29 2:00 kernel test robot
2023-07-29 1:19 kernel test robot
2023-07-28 23:47 kernel test robot
2023-07-28 10:25 kernel test robot
2023-07-28 9:53 kernel test robot
2023-07-27 21:24 kernel test robot
2023-07-27 12:37 kernel test robot
2023-07-27 3:27 kernel test robot
2023-07-26 23:47 kernel test robot
2023-07-26 21:10 kernel test robot
2023-07-26 19:58 kernel test robot
2023-07-26 12:15 kernel test robot
2023-07-26 9:39 kernel test robot
2023-07-26 9:29 kernel test robot
2023-07-26 8:47 kernel test robot
2023-07-26 8:36 kernel test robot
2023-07-26 8:05 kernel test robot
2023-07-25 10:00 [PATCH next 0/5] minmax: Relax type checks in min() and max() David Laight
2023-07-25 11:51 ` [PATCH next resend 2/5] minmax: Allow min()/max()/clamp() if the arguments have the same signedness David Laight
2023-07-25 18:02 ` kernel test robot
2023-07-25 18:33 ` kernel test robot
2023-07-26 9:19 ` David Laight
2023-07-26 9:50 ` Marc Zyngier
2023-07-26 10:25 ` David Laight
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=202307261759.cFMqbOSP-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.