Hi Leon,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on v5.9-rc5 next-20200914]
[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]
url:
https://github.com/0day-ci/linux/commits/Leon-Romanovsky/Query-GID-table-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: microblaze-randconfig-r033-20200913 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.0
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/infiniband/core/uverbs_std_types_device.c:6:
include/linux/overflow.h: In function 'array_size':
> include/linux/overflow.h:258:10: error: 'SIZE_MAX'
undeclared (first use in this function)
258 | return SIZE_MAX;
| ^~~~~~~~
include/linux/overflow.h:6:1: note: 'SIZE_MAX' is defined in header
'<stdint.h>'; did you forget to '#include <stdint.h>'?
5 | #include <linux/compiler.h>
+++ |+#include <stdint.h>
6 |
include/linux/overflow.h:258:10: note: each undeclared identifier is reported only once
for each function it appears in
258 | return SIZE_MAX;
| ^~~~~~~~
include/linux/overflow.h: In function 'array3_size':
include/linux/overflow.h:280:10: error: 'SIZE_MAX' undeclared (first use in
this function)
280 | return SIZE_MAX;
| ^~~~~~~~
include/linux/overflow.h:280:10: note: 'SIZE_MAX' is defined in header
'<stdint.h>'; did you forget to '#include <stdint.h>'?
include/linux/overflow.h: In function '__ab_c_size':
include/linux/overflow.h:296:10: error: 'SIZE_MAX' undeclared (first use in
this function)
296 | return SIZE_MAX;
| ^~~~~~~~
include/linux/overflow.h:296:10: note: 'SIZE_MAX' is defined in header
'<stdint.h>'; did you forget to '#include <stdint.h>'?
#
https://github.com/0day-ci/linux/commit/97341ae6bc1e5075caa16ee753a3e4f9d...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review Leon-Romanovsky/Query-GID-table-API/20200914-191347
git checkout 97341ae6bc1e5075caa16ee753a3e4f9d1ed522b
vim +/SIZE_MAX +258 include/linux/overflow.h
0c66847793d198 Jason Gunthorpe 2018-08-01 241
610b15c50e86eb Kees Cook 2018-05-07 242 /**
610b15c50e86eb Kees Cook 2018-05-07 243 * array_size() - Calculate size of
2-dimensional array.
610b15c50e86eb Kees Cook 2018-05-07 244 *
610b15c50e86eb Kees Cook 2018-05-07 245 * @a: dimension one
610b15c50e86eb Kees Cook 2018-05-07 246 * @b: dimension two
610b15c50e86eb Kees Cook 2018-05-07 247 *
610b15c50e86eb Kees Cook 2018-05-07 248 * Calculates size of 2-dimensional array:
@a * @b.
610b15c50e86eb Kees Cook 2018-05-07 249 *
610b15c50e86eb Kees Cook 2018-05-07 250 * Returns: number of bytes needed to
represent the array or SIZE_MAX on
610b15c50e86eb Kees Cook 2018-05-07 251 * overflow.
610b15c50e86eb Kees Cook 2018-05-07 252 */
610b15c50e86eb Kees Cook 2018-05-07 253 static inline __must_check size_t
array_size(size_t a, size_t b)
610b15c50e86eb Kees Cook 2018-05-07 254 {
610b15c50e86eb Kees Cook 2018-05-07 255 size_t bytes;
610b15c50e86eb Kees Cook 2018-05-07 256
610b15c50e86eb Kees Cook 2018-05-07 257 if (check_mul_overflow(a, b,
&bytes))
610b15c50e86eb Kees Cook 2018-05-07 @258 return SIZE_MAX;
610b15c50e86eb Kees Cook 2018-05-07 259
610b15c50e86eb Kees Cook 2018-05-07 260 return bytes;
610b15c50e86eb Kees Cook 2018-05-07 261 }
610b15c50e86eb Kees Cook 2018-05-07 262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org