lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 24 Sep 2022 05:36:39 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Jason A. Donenfeld" <zx2c4@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, 0day robot <lkp@...el.com>
Subject: drivers/hwmon/sht4x.c:132:26: error: anonymous bit-field has
 negative width (-1)

tree:   https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220923-234348/Jason-A-Donenfeld/minmax-clamp-more-efficiently-by-avoiding-extra-comparison/20220923-180728
head:   50f8b5576755b00cc3995b17674bdb8cfd988118
commit: 50f8b5576755b00cc3995b17674bdb8cfd988118 minmax: clamp more efficiently by avoiding extra comparison
date:   6 hours ago
config: mips-randconfig-r003-20220924
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/50f8b5576755b00cc3995b17674bdb8cfd988118
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review UPDATE-20220923-234348/Jason-A-Donenfeld/minmax-clamp-more-efficiently-by-avoiding-extra-comparison/20220923-180728
        git checkout 50f8b5576755b00cc3995b17674bdb8cfd988118
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/hwmon/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/hwmon/sht4x.c:132:26: error: anonymous bit-field has negative width (-1)
           data->update_interval = clamp_val(val, SHT4X_MIN_POLL_INTERVAL, UINT_MAX);
                                   ^
   include/linux/minmax.h:158:32: note: expanded from macro 'clamp_val'
   #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
                                  ^
   include/linux/minmax.h:145:36: note: expanded from macro 'clamp_t'
   #define clamp_t(type, val, lo, hi) __careful_clamp((type)(val), (type)(lo), (type)(hi))
                                      ^
   include/linux/minmax.h:54:2: note: expanded from macro '__careful_clamp'
           __clamp_input_check(lo, hi) +                                           \
           ^
   include/linux/minmax.h:50:10: note: expanded from macro '__clamp_input_check'
           (BUILD_BUG_ON_ZERO(__builtin_choose_expr(                               \
            ^
   include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                       ^
   1 error generated.


vim +132 drivers/hwmon/sht4x.c

505c2549373f3a Navin Sankar Velliangiri 2021-05-24  129  
505c2549373f3a Navin Sankar Velliangiri 2021-05-24  130  static ssize_t sht4x_interval_write(struct sht4x_data *data, long val)
505c2549373f3a Navin Sankar Velliangiri 2021-05-24  131  {
505c2549373f3a Navin Sankar Velliangiri 2021-05-24 @132  	data->update_interval = clamp_val(val, SHT4X_MIN_POLL_INTERVAL, UINT_MAX);
505c2549373f3a Navin Sankar Velliangiri 2021-05-24  133  
505c2549373f3a Navin Sankar Velliangiri 2021-05-24  134  	return 0;
505c2549373f3a Navin Sankar Velliangiri 2021-05-24  135  }
505c2549373f3a Navin Sankar Velliangiri 2021-05-24  136  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (186056 bytes)

Powered by blists - more mailing lists