tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: f7f581157d1c8a2f14bef2739dd34135c9e6b233 commit: 699f6820cbd0bc56fff55152f44dd98fc7c3470f [12106/12223] Merge remote-tracking branch 'amdgpu/drm-next' config: riscv-randconfig-r022-20210908 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a) 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=699f6820cbd0bc56fff55152f44dd98fc7c3470f 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 699f6820cbd0bc56fff55152f44dd98fc7c3470f # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:34: In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67: >> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable] uint64_t temp; ^ 1 error generated. -- In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:40: In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.h:30: In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67: >> drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable] uint64_t temp; ^ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:99:3: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] BIOS_CMD_TABLE_PARA_REVISION(digxencodercontrol); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:62:4: note: expanded from macro 'BIOS_CMD_TABLE_PARA_REVISION' GET_INDEX_INTO_MASTER_TABLE(command, fname)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:191:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE' GET_INDEX_INTO_MASTER_TABLE(command, fname), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~ include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:191:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE' GET_INDEX_INTO_MASTER_TABLE(command, fname), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~ include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:191:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE' GET_INDEX_INTO_MASTER_TABLE(command, fname), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~ include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value' (cond) ? \ ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:234:2: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] BIOS_CMD_TABLE_REVISION(dig1transmittercontrol, frev, crev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:58:3: note: expanded from macro 'BIOS_CMD_TABLE_REVISION' GET_INDEX_INTO_MASTER_TABLE(command, fname), &frev, &crev) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:309:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE' GET_INDEX_INTO_MASTER_TABLE(command, fname), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~ include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:309:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:53:3: note: expanded from macro 'EXEC_BIOS_CMD_TABLE' GET_INDEX_INTO_MASTER_TABLE(command, fname), \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:49:15: note: expanded from macro 'GET_INDEX_INTO_MASTER_TABLE' ->FieldName)-(char *)0)/sizeof(uint16_t)) ^~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ^~~~ include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/bios/command_table2.c:309:6: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction] if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps)) -- In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.c:26: In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../dmub_srv.h:67: >> drivers/gpu/drm/amd/amdgpu/../display/dmub/src/../inc/dmub_cmd.h:2655:12: error: variable 'temp' set but not used [-Werror,-Wunused-but-set-variable] uint64_t temp; ^ 1 error generated. vim +/temp +2655 drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h 84034ad4c0c081 Anthony Koo 2020-05-15 2638 592a631883fdaa Anthony Koo 2021-03-08 2639 /** 592a631883fdaa Anthony Koo 2021-03-08 2640 * @brief Flushes commands in the ringbuffer to framebuffer memory. 592a631883fdaa Anthony Koo 2021-03-08 2641 * 592a631883fdaa Anthony Koo 2021-03-08 2642 * Avoids a race condition where DMCUB accesses memory while 592a631883fdaa Anthony Koo 2021-03-08 2643 * there are still writes in flight to framebuffer. 592a631883fdaa Anthony Koo 2021-03-08 2644 * 592a631883fdaa Anthony Koo 2021-03-08 2645 * @param rb DMUB ringbuffer 592a631883fdaa Anthony Koo 2021-03-08 2646 */ 84034ad4c0c081 Anthony Koo 2020-05-15 2647 static inline void dmub_rb_flush_pending(const struct dmub_rb *rb) 84034ad4c0c081 Anthony Koo 2020-05-15 2648 { 84034ad4c0c081 Anthony Koo 2020-05-15 2649 uint32_t rptr = rb->rptr; 84034ad4c0c081 Anthony Koo 2020-05-15 2650 uint32_t wptr = rb->wrpt; 84034ad4c0c081 Anthony Koo 2020-05-15 2651 84034ad4c0c081 Anthony Koo 2020-05-15 2652 while (rptr != wptr) { 3a9d5b0b5301fb Anthony Koo 2021-08-14 2653 uint64_t volatile *data = (uint64_t volatile *)rb->base_address + rptr / sizeof(uint64_t); 3a9d5b0b5301fb Anthony Koo 2021-08-14 2654 //uint64_t volatile *p = (uint64_t volatile *)data; 3a9d5b0b5301fb Anthony Koo 2021-08-14 @2655 uint64_t temp; 3a9d5b0b5301fb Anthony Koo 2021-08-14 2656 uint8_t i; 84034ad4c0c081 Anthony Koo 2020-05-15 2657 3a9d5b0b5301fb Anthony Koo 2021-08-14 2658 for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) 3a9d5b0b5301fb Anthony Koo 2021-08-14 2659 temp = *data++; 84034ad4c0c081 Anthony Koo 2020-05-15 2660 84034ad4c0c081 Anthony Koo 2020-05-15 2661 rptr += DMUB_RB_CMD_SIZE; 84034ad4c0c081 Anthony Koo 2020-05-15 2662 if (rptr >= rb->capacity) 84034ad4c0c081 Anthony Koo 2020-05-15 2663 rptr %= rb->capacity; 84034ad4c0c081 Anthony Koo 2020-05-15 2664 } 84034ad4c0c081 Anthony Koo 2020-05-15 2665 } 84034ad4c0c081 Anthony Koo 2020-05-15 2666 :::::: The code at line 2655 was first introduced by commit :::::: 3a9d5b0b5301fb992554ee93ae34fe91771e6434 drm/amd/display: [FW Promotion] Release 0.0.80 :::::: TO: Anthony Koo <Anthony.Koo@xxxxxxx> :::::: CC: Alex Deucher <alexander.deucher@xxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip