[linux-next:master 7355/7806] drivers/pinctrl/renesas/pfc-r8a77965.c:5030:27: error: 'mlb_3pin_groups' defined but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8006b911c90a4ec09958447d24c8a4c3538f5723
commit: 23f87fe82c0341ff79807fb5f92a05a33ce1b055 [7355/7806] pinctrl: renesas: r8a779[56]x: Add MediaLB pins
config: sh-buildonly-randconfig-r002-20211014 (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 23f87fe82c0341ff79807fb5f92a05a33ce1b055
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
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 >>):
>> drivers/pinctrl/renesas/pfc-r8a77965.c:5030:27: error: 'mlb_3pin_groups' defined but not used [-Werror=unused-const-variable=]
5030 | static const char * const mlb_3pin_groups[] = {
| ^~~~~~~~~~~~~~~
>> drivers/pinctrl/renesas/pfc-r8a77965.c:2616:27: error: 'mlb_3pin_mux' defined but not used [-Werror=unused-const-variable=]
2616 | static const unsigned int mlb_3pin_mux[] = {
| ^~~~~~~~~~~~
>> drivers/pinctrl/renesas/pfc-r8a77965.c:2613:27: error: 'mlb_3pin_pins' defined but not used [-Werror=unused-const-variable=]
2613 | static const unsigned int mlb_3pin_pins[] = {
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> drivers/pinctrl/renesas/pfc-r8a77951.c:4807:27: error: 'mlb_3pin_groups' defined but not used [-Werror=unused-const-variable=]
4807 | static const char * const mlb_3pin_groups[] = {
| ^~~~~~~~~~~~~~~
>> drivers/pinctrl/renesas/pfc-r8a77951.c:2460:27: error: 'mlb_3pin_mux' defined but not used [-Werror=unused-const-variable=]
2460 | static const unsigned int mlb_3pin_mux[] = {
| ^~~~~~~~~~~~
>> drivers/pinctrl/renesas/pfc-r8a77951.c:2457:27: error: 'mlb_3pin_pins' defined but not used [-Werror=unused-const-variable=]
2457 | static const unsigned int mlb_3pin_pins[] = {
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/mlb_3pin_groups +5030 drivers/pinctrl/renesas/pfc-r8a77965.c
5029
> 5030 static const char * const mlb_3pin_groups[] = {
5031 "mlb_3pin",
5032 };
5033
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v10] drm/bridge: add it6505 driver
by kernel test robot
Hi allen,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15-rc5 next-20211013]
[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/allen/drm-bridge-add-it6505-driv...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 348949d9a4440abdab3b1dc99a9bb660e8c7da7c
config: microblaze-randconfig-r015-20211014 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/b7059f22f5a66e301596957d9c6321d64...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review allen/drm-bridge-add-it6505-driver/20211014-113315
git checkout b7059f22f5a66e301596957d9c6321d64358d6f0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 error/warnings (new ones prefixed by >>):
drivers/gpu/drm/bridge/ite-it6505.c: In function 'it6505_bridge_atomic_enable':
>> drivers/gpu/drm/bridge/ite-it6505.c:2919:22: error: implicit declaration of function 'drm_bridge_new_crtc_state'; did you mean 'drm_atomic_get_new_crtc_state'? [-Werror=implicit-function-declaration]
2919 | crtc_state = drm_bridge_new_crtc_state(bridge, old_state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_get_new_crtc_state
>> drivers/gpu/drm/bridge/ite-it6505.c:2919:20: warning: assignment to 'const struct drm_crtc_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2919 | crtc_state = drm_bridge_new_crtc_state(bridge, old_state);
| ^
cc1: some warnings being treated as errors
vim +2919 drivers/gpu/drm/bridge/ite-it6505.c
2901
2902 static void it6505_bridge_atomic_enable(struct drm_bridge *bridge,
2903 struct drm_bridge_state *old_state)
2904 {
2905 struct it6505 *it6505 = bridge_to_it6505(bridge);
2906 struct device *dev = &it6505->client->dev;
2907 struct drm_atomic_state *state = old_state->base.state;
2908 struct hdmi_avi_infoframe frame;
2909 const struct drm_crtc_state *crtc_state;
2910 const struct drm_display_mode *mode;
2911 struct drm_connector *connector;
2912 int ret;
2913
2914 DRM_DEV_DEBUG_DRIVER(dev, "start");
2915
2916 connector = drm_atomic_get_new_connector_for_encoder(state,
2917 bridge->encoder);
2918
> 2919 crtc_state = drm_bridge_new_crtc_state(bridge, old_state);
2920 mode = &crtc_state->mode;
2921 ret = drm_hdmi_avi_infoframe_from_display_mode(&frame,
2922 connector,
2923 mode);
2924 if (ret)
2925 dev_err(dev, "Failed to setup AVI infoframe: %d", ret);
2926
2927 it6505_update_video_parameter(it6505, mode);
2928
2929 ret = it6505_send_video_infoframe(it6505, &frame);
2930
2931 if (ret)
2932 dev_err(dev, "Failed to send AVI infoframe: %d", ret);
2933
2934 it6505_int_mask_enable(it6505);
2935 it6505_video_reset(it6505);
2936 }
2937
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 26d6574109838b8fa40a8261421693015bab0579
commit: baec970aa5ba11099ad7a91773350c91fb2113f0 mips: Add N64 machine type
date: 9 months ago
config: mips-randconfig-s032-20211014 (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout baec970aa5ba11099ad7a91773350c91fb2113f0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
arch/mips/boot/compressed/decompress.c: note: in included file (through arch/mips/boot/compressed/../../../../lib/decompress_unxz.c):
>> arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: expected restricted __le32 const [usertype] *p
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:393:28: sparse: got unsigned int const [usertype] *
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: sparse: expected restricted __le32 const [usertype] *p
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:427:48: sparse: got unsigned int const [usertype] *
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: sparse: expected restricted __le32 const [usertype] *p
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:435:37: sparse: got unsigned int const [usertype] *
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le32 const [usertype] *p @@ got unsigned int const [usertype] * @@
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: sparse: expected restricted __le32 const [usertype] *p
arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c:459:28: sparse: got unsigned int const [usertype] *
arch/mips/boot/compressed/decompress.c:110:57: sparse: sparse: Using plain integer as NULL pointer
arch/mips/boot/compressed/decompress.c:110:60: sparse: sparse: Using plain integer as NULL pointer
arch/mips/boot/compressed/decompress.c:111:57: sparse: sparse: Using plain integer as NULL pointer
vim +393 arch/mips/boot/compressed/../../../../lib/xz/xz_dec_stream.c
24fa0402a9b6a5 Lasse Collin 2011-01-12 385
24fa0402a9b6a5 Lasse Collin 2011-01-12 386 /* Decode the Stream Header field (the first 12 bytes of the .xz Stream). */
24fa0402a9b6a5 Lasse Collin 2011-01-12 387 static enum xz_ret dec_stream_header(struct xz_dec *s)
24fa0402a9b6a5 Lasse Collin 2011-01-12 388 {
24fa0402a9b6a5 Lasse Collin 2011-01-12 389 if (!memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE))
24fa0402a9b6a5 Lasse Collin 2011-01-12 390 return XZ_FORMAT_ERROR;
24fa0402a9b6a5 Lasse Collin 2011-01-12 391
24fa0402a9b6a5 Lasse Collin 2011-01-12 392 if (xz_crc32(s->temp.buf + HEADER_MAGIC_SIZE, 2, 0)
24fa0402a9b6a5 Lasse Collin 2011-01-12 @393 != get_le32(s->temp.buf + HEADER_MAGIC_SIZE + 2))
24fa0402a9b6a5 Lasse Collin 2011-01-12 394 return XZ_DATA_ERROR;
24fa0402a9b6a5 Lasse Collin 2011-01-12 395
24fa0402a9b6a5 Lasse Collin 2011-01-12 396 if (s->temp.buf[HEADER_MAGIC_SIZE] != 0)
24fa0402a9b6a5 Lasse Collin 2011-01-12 397 return XZ_OPTIONS_ERROR;
24fa0402a9b6a5 Lasse Collin 2011-01-12 398
24fa0402a9b6a5 Lasse Collin 2011-01-12 399 /*
24fa0402a9b6a5 Lasse Collin 2011-01-12 400 * Of integrity checks, we support only none (Check ID = 0) and
24fa0402a9b6a5 Lasse Collin 2011-01-12 401 * CRC32 (Check ID = 1). However, if XZ_DEC_ANY_CHECK is defined,
24fa0402a9b6a5 Lasse Collin 2011-01-12 402 * we will accept other check types too, but then the check won't
24fa0402a9b6a5 Lasse Collin 2011-01-12 403 * be verified and a warning (XZ_UNSUPPORTED_CHECK) will be given.
24fa0402a9b6a5 Lasse Collin 2011-01-12 404 */
24fa0402a9b6a5 Lasse Collin 2011-01-12 405 s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1];
24fa0402a9b6a5 Lasse Collin 2011-01-12 406
:::::: The code at line 393 was first introduced by commit
:::::: 24fa0402a9b6a537e87e38341e78b7da86486846 decompressors: add XZ decompressor module
:::::: TO: Lasse Collin <lasse.collin(a)tukaani.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[dhowells-fs:fscache-rewrite-indexing 75/75] fs/cachefiles/io.c:477:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing
head: 96d4e1af98c26988d3c1b3cf688974c24de90fa9
commit: 96d4e1af98c26988d3c1b3cf688974c24de90fa9 [75/75] cachefiles: Add error injection support
config: hexagon-randconfig-r041-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing
git checkout 96d4e1af98c26988d3c1b3cf688974c24de90fa9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/cachefiles/io.c:477:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (pos == 0)
^~~~~~~~
fs/cachefiles/io.c:480:6: note: uninitialized use occurs here
if (ret < 0) {
^~~
fs/cachefiles/io.c:477:2: note: remove the 'if' if its condition is always true
if (pos == 0)
^~~~~~~~~~~~~
fs/cachefiles/io.c:422:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +477 fs/cachefiles/io.c
409
410 /*
411 * Prepare for a write to occur.
412 */
413 static int __cachefiles_prepare_write(struct netfs_cache_resources *cres,
414 loff_t *_start, size_t *_len, loff_t i_size,
415 bool no_space_allocated_yet)
416 {
417 struct cachefiles_object *object = cachefiles_cres_object(cres);
418 struct cachefiles_cache *cache = object->volume->cache;
419 struct file *file = cachefiles_cres_file(cres);
420 loff_t start = *_start, pos;
421 size_t len = *_len, down;
422 int ret;
423
424 if (!file) {
425 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE))
426 return -ENOBUFS;
427 file = cachefiles_cres_file(cres);
428 if (!file)
429 return -ENOBUFS;
430 }
431
432 /* Round to DIO size */
433 down = start - round_down(start, PAGE_SIZE);
434 *_start = start - down;
435 *_len = round_up(down + len, PAGE_SIZE);
436
437 /* We need to work out whether there's sufficient disk space to perform
438 * the write - but we can skip that check if we have space already
439 * allocated.
440 */
441 if (no_space_allocated_yet)
442 goto check_space;
443
444 pos = cachefiles_inject_read_error();
445 if (pos == 0)
446 pos = vfs_llseek(file, *_start, SEEK_DATA);
447 if (pos < 0 && pos >= (loff_t)-MAX_ERRNO) {
448 if (pos == -ENXIO)
449 goto check_space; /* Unallocated tail */
450 trace_cachefiles_io_error(object, file_inode(file), pos,
451 cachefiles_trace_seek_error);
452 return pos;
453 }
454 if ((u64)pos >= (u64)*_start + *_len)
455 goto check_space; /* Unallocated region */
456
457 /* We have a block that's at least partially filled - if we're low on
458 * space, we need to see if it's fully allocated. If it's not, we may
459 * want to cull it.
460 */
461 if (cachefiles_has_space(cache, 0, *_len / PAGE_SIZE) == 0)
462 return 0; /* Enough space to simply overwrite the whole block */
463
464 pos = cachefiles_inject_read_error();
465 if (pos == 0)
466 pos = vfs_llseek(file, *_start, SEEK_HOLE);
467 if (pos < 0 && pos >= (loff_t)-MAX_ERRNO) {
468 trace_cachefiles_io_error(object, file_inode(file), pos,
469 cachefiles_trace_seek_error);
470 return pos;
471 }
472 if ((u64)pos >= (u64)*_start + *_len)
473 return 0; /* Fully allocated */
474
475 /* Partially allocated, but insufficient space: cull. */
476 pos = cachefiles_inject_remove_error();
> 477 if (pos == 0)
478 ret = vfs_fallocate(file, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
479 *_start, *_len);
480 if (ret < 0) {
481 trace_cachefiles_io_error(object, file_inode(file), ret,
482 cachefiles_trace_fallocate_error);
483 cachefiles_io_error_obj(object,
484 "CacheFiles: fallocate failed (%d)\n", ret);
485 ret = -EIO;
486 }
487
488 return ret;
489
490 check_space:
491 return cachefiles_has_space(cache, 0, *_len / PAGE_SIZE);
492 }
493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH] thermal/core: fix a UAF bug in __thermal_cooling_device_register()
by kernel test robot
Hi Ziyang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rafael-pm/thermal]
[also build test ERROR on v5.15-rc5 next-20211013]
[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/Ziyang-Xuan/thermal-core-fix-a-U...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git thermal
config: riscv-buildonly-randconfig-r001-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/fb39770678d4d898891ede9121c811844...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ziyang-Xuan/thermal-core-fix-a-UAF-bug-in-__thermal_cooling_device_register/20211014-164859
git checkout fb39770678d4d898891ede9121c811844b5f2890
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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/thermal/thermal_core.c:22:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/thermal/thermal_core.c:22:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/thermal/thermal_core.c:22:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/thermal/thermal_core.c:901:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (id < 0)
^~~~~~
drivers/thermal/thermal_core.c:949:17: note: uninitialized use occurs here
return ERR_PTR(ret);
^~~
drivers/thermal/thermal_core.c:901:2: note: remove the 'if' if its condition is always false
if (id < 0)
^~~~~~~~~~~
drivers/thermal/thermal_core.c:890:13: note: initialize the variable 'ret' to silence this warning
int id, ret;
^
= 0
8 errors generated.
vim +901 drivers/thermal/thermal_core.c
866
867 /**
868 * __thermal_cooling_device_register() - register a new thermal cooling device
869 * @np: a pointer to a device tree node.
870 * @type: the thermal cooling device type.
871 * @devdata: device private data.
872 * @ops: standard thermal cooling devices callbacks.
873 *
874 * This interface function adds a new thermal cooling device (fan/processor/...)
875 * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself
876 * to all the thermal zone devices registered at the same time.
877 * It also gives the opportunity to link the cooling device to a device tree
878 * node, so that it can be bound to a thermal zone created out of device tree.
879 *
880 * Return: a pointer to the created struct thermal_cooling_device or an
881 * ERR_PTR. Caller must check return value with IS_ERR*() helpers.
882 */
883 static struct thermal_cooling_device *
884 __thermal_cooling_device_register(struct device_node *np,
885 const char *type, void *devdata,
886 const struct thermal_cooling_device_ops *ops)
887 {
888 struct thermal_cooling_device *cdev;
889 struct thermal_zone_device *pos = NULL;
890 int id, ret;
891
892 if (!ops || !ops->get_max_state || !ops->get_cur_state ||
893 !ops->set_cur_state)
894 return ERR_PTR(-EINVAL);
895
896 cdev = kzalloc(sizeof(*cdev), GFP_KERNEL);
897 if (!cdev)
898 return ERR_PTR(-ENOMEM);
899
900 id = ida_simple_get(&thermal_cdev_ida, 0, 0, GFP_KERNEL);
> 901 if (id < 0)
902 goto out_kfree_cdev;
903 cdev->id = id;
904
905 cdev->type = kstrdup(type ? type : "", GFP_KERNEL);
906 if (!cdev->type) {
907 ret = -ENOMEM;
908 goto out_ida_remove;
909 }
910
911 mutex_init(&cdev->lock);
912 INIT_LIST_HEAD(&cdev->thermal_instances);
913 cdev->np = np;
914 cdev->ops = ops;
915 cdev->updated = false;
916 cdev->device.class = &thermal_class;
917 cdev->devdata = devdata;
918 thermal_cooling_device_setup_sysfs(cdev);
919 dev_set_name(&cdev->device, "cooling_device%d", cdev->id);
920 ret = device_register(&cdev->device);
921 if (ret)
922 goto out_kfree_type;
923
924 /* Add 'this' new cdev to the global cdev list */
925 mutex_lock(&thermal_list_lock);
926 list_add(&cdev->node, &thermal_cdev_list);
927 mutex_unlock(&thermal_list_lock);
928
929 /* Update binding information for 'this' new cdev */
930 bind_cdev(cdev);
931
932 mutex_lock(&thermal_list_lock);
933 list_for_each_entry(pos, &thermal_tz_list, node)
934 if (atomic_cmpxchg(&pos->need_update, 1, 0))
935 thermal_zone_device_update(pos,
936 THERMAL_EVENT_UNSPECIFIED);
937 mutex_unlock(&thermal_list_lock);
938
939 return cdev;
940
941 out_kfree_type:
942 kfree(cdev->type);
943 put_device(&cdev->device);
944 cdev = NULL;
945 out_ida_remove:
946 ida_simple_remove(&thermal_cdev_ida, id);
947 out_kfree_cdev:
948 kfree(cdev);
949 return ERR_PTR(ret);
950 }
951
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[clk:clk-qcom 17/38] drivers/clk/qcom/gcc-sc7280.c:200:37: warning: unused variable 'gcc_parent_data_0_ao'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-qcom
head: 1daec8cfebc28bbe596743c34bebd11b80fba990
commit: 3165d1e3c737fd9432e9e68b44a64c47f886f647 [17/38] clk: qcom: gcc: Remove CPUSS clocks control for SC7280
config: arm64-randconfig-r016-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/commit/?id=...
git remote add clk https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
git fetch --no-tags clk clk-qcom
git checkout 3165d1e3c737fd9432e9e68b44a64c47f886f647
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/clk/qcom/gcc-sc7280.c:200:37: warning: unused variable 'gcc_parent_data_0_ao' [-Wunused-const-variable]
static const struct clk_parent_data gcc_parent_data_0_ao[] = {
^
1 warning generated.
vim +/gcc_parent_data_0_ao +200 drivers/clk/qcom/gcc-sc7280.c
a3cc092196ef63 Taniya Das 2021-02-10 199
a3cc092196ef63 Taniya Das 2021-02-10 @200 static const struct clk_parent_data gcc_parent_data_0_ao[] = {
a3cc092196ef63 Taniya Das 2021-02-10 201 { .fw_name = "bi_tcxo_ao" },
a3cc092196ef63 Taniya Das 2021-02-10 202 { .hw = &gcc_gpll0.clkr.hw },
a3cc092196ef63 Taniya Das 2021-02-10 203 { .hw = &gcc_gpll0_out_even.clkr.hw },
a3cc092196ef63 Taniya Das 2021-02-10 204 };
a3cc092196ef63 Taniya Das 2021-02-10 205
:::::: The code at line 200 was first introduced by commit
:::::: a3cc092196ef63570c8744c3ac88c3c6c67ab44b clk: qcom: Add Global Clock controller (GCC) driver for SC7280
:::::: TO: Taniya Das <tdas(a)codeaurora.org>
:::::: CC: Stephen Boyd <sboyd(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v3] mm: page_alloc: Add debug log in free_reserved_area for static memory
by kernel test robot
Hi Faiyaz,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.15-rc5]
[cannot apply to hnaz-mm/master next-20211013]
[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/Faiyaz-Mohammed/mm-page_alloc-Ad...
base: 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc
config: hexagon-randconfig-r004-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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
# https://github.com/0day-ci/linux/commit/009729e4f858e64537a4a144369b155f8...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Faiyaz-Mohammed/mm-page_alloc-Add-debug-log-in-free_reserved_area-for-static-memory/20211014-151427
git checkout 009729e4f858e64537a4a144369b155f8d69d62f
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
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 >>):
mm/page_alloc.c:3810:15: warning: no previous prototype for function 'should_fail_alloc_page' [-Wmissing-prototypes]
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
mm/page_alloc.c:3810:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
static
>> mm/page_alloc.c:8134:12: error: use of undeclared identifier '__RET_IP_'
(void *)__RET_IP_);
^
1 warning and 1 error generated.
vim +/__RET_IP_ +8134 mm/page_alloc.c
8097
8098 unsigned long free_reserved_area(void *start, void *end, int poison, const char *s)
8099 {
8100 const phys_addr_t pstart = __pa(start);
8101 const phys_addr_t pend = __pa(end);
8102 void *pos;
8103 unsigned long pages = 0;
8104
8105 start = (void *)PAGE_ALIGN((unsigned long)start);
8106 end = (void *)((unsigned long)end & PAGE_MASK);
8107 for (pos = start; pos < end; pos += PAGE_SIZE, pages++) {
8108 struct page *page = virt_to_page(pos);
8109 void *direct_map_addr;
8110
8111 /*
8112 * 'direct_map_addr' might be different from 'pos'
8113 * because some architectures' virt_to_page()
8114 * work with aliases. Getting the direct map
8115 * address ensures that we get a _writeable_
8116 * alias for the memset().
8117 */
8118 direct_map_addr = page_address(page);
8119 /*
8120 * Perform a kasan-unchecked memset() since this memory
8121 * has not been initialized.
8122 */
8123 direct_map_addr = kasan_reset_tag(direct_map_addr);
8124 if ((unsigned int)poison <= 0xFF)
8125 memset(direct_map_addr, poison, PAGE_SIZE);
8126
8127 free_reserved_page(page);
8128 }
8129
8130 if (pages && s) {
8131 pr_info("Freeing %s memory: %ldK\n",
8132 s, pages << (PAGE_SHIFT - 10));
8133 pr_debug("[%pa-%pa] %pS\n", &pstart, &pend,
> 8134 (void *)__RET_IP_);
8135 }
8136
8137 return pages;
8138 }
8139
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v2] tracing/cfi: Fix cmp_entries_* functions signature mismatch
by kernel test robot
Hi Kalesh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 348949d9a4440abdab3b1dc99a9bb660e8c7da7c]
url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/tracing-cfi-Fix-cmp...
base: 348949d9a4440abdab3b1dc99a9bb660e8c7da7c
config: arm64-randconfig-r005-20211014 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/aca9efb61e0559ff7abff8c8bce5e1a65...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kalesh-Singh/tracing-cfi-Fix-cmp_entries_-functions-signature-mismatch/20211014-093824
git checkout aca9efb61e0559ff7abff8c8bce5e1a65a73ccce
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/trace/tracing_map.c: In function 'cmp_entries_dup':
>> kernel/trace/tracing_map.c:839:52: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
839 | const struct tracing_map_sort_entry **pa = A;
| ^
kernel/trace/tracing_map.c:840:52: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
840 | const struct tracing_map_sort_entry **pb = B;
| ^
kernel/trace/tracing_map.c: In function 'cmp_entries_sum':
kernel/trace/tracing_map.c:853:52: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
853 | const struct tracing_map_sort_entry **pa = A;
| ^
kernel/trace/tracing_map.c:854:52: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
854 | const struct tracing_map_sort_entry **pb = B;
| ^
kernel/trace/tracing_map.c: In function 'cmp_entries_key':
kernel/trace/tracing_map.c:884:52: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
884 | const struct tracing_map_sort_entry **pa = A;
| ^
kernel/trace/tracing_map.c:885:52: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
885 | const struct tracing_map_sort_entry **pb = B;
| ^
vim +/const +839 kernel/trace/tracing_map.c
836
837 static int cmp_entries_dup(const void *A, const void *B)
838 {
> 839 const struct tracing_map_sort_entry **pa = A;
840 const struct tracing_map_sort_entry **pb = B;
841 const struct tracing_map_sort_entry *a = *pa;
842 const struct tracing_map_sort_entry *b = *pb;
843 int ret = 0;
844
845 if (memcmp(a->key, b->key, a->elt->map->key_size))
846 ret = 1;
847
848 return ret;
849 }
850
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
include/linux/memcontrol.h:1804:5: error: no previous prototype for 'memcg_charge_bulk_pages'
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20211014-160451/Vasily-Av...
head: 834132e4456c615433314628b950f9dd10406698
commit: 834132e4456c615433314628b950f9dd10406698 memcg: enable memory accounting in __alloc_pages_bulk
date: 8 hours ago
config: i386-buildonly-randconfig-r004-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/834132e4456c615433314628b950f9dd1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20211014-160451/Vasily-Averin/memcg-enable-memory-accounting-in-__alloc_pages_bulk/20211008-172703
git checkout 834132e4456c615433314628b950f9dd10406698
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
>> include/linux/memcontrol.h:1804:5: error: no previous prototype for 'memcg_charge_bulk_pages' [-Werror=missing-prototypes]
1804 | int memcg_charge_bulk_pages(gfp_t gfp, int nr_pages,
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:122: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1315: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:226: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/memcg_charge_bulk_pages +1804 include/linux/memcontrol.h
1803
> 1804 int memcg_charge_bulk_pages(gfp_t gfp, int nr_pages,
1805 struct list_head *page_list,
1806 struct page **page_array)
1807 {
1808 return 0;
1809 }
1810 #endif /* CONFIG_MEMCG_KMEM */
1811
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week