Messages in this thread | | | Date | Wed, 21 Jul 2021 14:53:19 +0800 | From | kernel test robot <> | Subject | drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/processpptables.c:841:6: warning: performing pointer subtraction with a null pointer has undefined behavior |
| |
Hi Dave,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b commit: 0c8d22fcae2f9590a07b000e1724f665820b77f7 Merge tag 'amd-drm-next-5.10-2020-09-03' of git://people.freedesktop.org/~agd5f/linux into drm-next date: 11 months ago config: powerpc64-randconfig-r012-20210720 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c781eb153bfbd1b52b03efe34f56bbeccbb8aba6) 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 powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c8d22fcae2f9590a07b000e1724f665820b77f7 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 0c8d22fcae2f9590a07b000e1724f665820b77f7 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/processpptables.c:23: In file included from drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_debug.h:34: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/processpptables.c:841:6: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, PowerPlayInfo), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/processpptables.c:1089:5: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, FirmwareInfo), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ 3 warnings generated. -- In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu8_hwmgr.c:23: In file included from drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_debug.h:34: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu8_hwmgr.c:319:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, IntegratedSystemInfo), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu8_hwmgr.c:2044:5: warning: no previous prototype for function 'smu8_init_function_pointers' [-Wmissing-prototypes] int smu8_init_function_pointers(struct pp_hwmgr *hwmgr) ^ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu8_hwmgr.c:2044:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int smu8_init_function_pointers(struct pp_hwmgr *hwmgr) ^ static 3 warnings generated. -- In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:23: In file included from drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_debug.h:34: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:136:14: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] int index = GetIndexIntoMasterTable(DATA, PowerPlayInfo); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ 2 warnings generated. -- In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:23: In file included from drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_debug.h:34: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:31: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:7: warning: variable 'X_LessThanOne' set but not used [-Wunused-but-set-variable] bool X_LessThanOne, Y_LessThanOne; ^ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppevvmath.h:336:22: warning: variable 'Y_LessThanOne' set but not used [-Wunused-but-set-variable] bool X_LessThanOne, Y_LessThanOne; ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:145:5: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, VRAM_Info), &size, &frev, &crev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:191:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, DynamicMemorySettings), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:203:14: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] int index = GetIndexIntoMasterTable(DATA, VoltageObjectInfo); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:261:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryClockParam), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:308:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryClockParam), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:329:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryClockParam), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:359:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryEnginePLL), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:383:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryEnginePLL), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:420:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryEnginePLL), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:453:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ComputeMemoryEnginePLL), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:490:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, FirmwareInfo), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:610:5: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, GPIO_Pin_LUT), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:678:6: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(DATA, ASIC_ProfilingInfo), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:744:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ReadEfuseValue), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:765:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ReadEfuseValue), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:785:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ReadEfuseValue), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomctrl.c:806:4: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] GetIndexIntoMasterTable(COMMAND, ReadEfuseValue), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) -- In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:24: In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:27: In file included from drivers/gpu/drm/amd/amdgpu/../pm/inc/hwmgr.h:26: In file included from include/linux/seq_file.h:7: In file included from include/linux/bug.h:5: In file included from arch/powerpc/include/asm/bug.h:109: In file included from include/asm-generic/bug.h:20: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:60:8: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] idx = GetIndexIntoMasterDataTable(voltageobject_info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:168:8: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] idx = GetIndexIntoMasterDataTable(gpio_pin_lut); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:258:8: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] idx = GetIndexIntoMasterCmdTable(computegpuclockparam); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:32:80: note: expanded from macro 'GetIndexIntoMasterCmdTable' (((char*)(&((struct atom_master_list_of_command_functions_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:285:8: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] idx = GetIndexIntoMasterDataTable(asic_profiling_info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:469:8: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] idx = GetIndexIntoMasterDataTable(smu_info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:505:7: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] ix = GetIndexIntoMasterCmdTable(getsmuclockinfo); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:32:80: note: expanded from macro 'GetIndexIntoMasterCmdTable' (((char*)(&((struct atom_master_list_of_command_functions_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:594:7: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] ix = GetIndexIntoMasterDataTable(firmwareinfo); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.c:626:7: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] ix = GetIndexIntoMasterDataTable(smc_dpm_info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ 9 warnings generated. -- In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:23: In file included from drivers/gpu/drm/amd/amdgpu/../pm/inc/pp_debug.h:34: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:3075:14: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] int index = GetIndexIntoMasterTable(DATA, FirmwareInfo); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../include/atombios.h:7133:132: note: expanded from macro 'GetIndexIntoMasterTable' #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5207:5: warning: no previous prototype for function 'smu7_init_function_pointers' [-Wmissing-prototypes] int smu7_init_function_pointers(struct pp_hwmgr *hwmgr) ^ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5207:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int smu7_init_function_pointers(struct pp_hwmgr *hwmgr) ^ static 3 warnings generated. -- In file included from drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:23: In file included from include/linux/module.h:12: In file included from include/linux/list.h:9: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:29: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ <built-in>:310:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:49:14: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction] int index = GetIndexIntoMasterDataTable(powerplayinfo); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/ppatomfwctrl.h:34:74: note: expanded from macro 'GetIndexIntoMasterDataTable' (((char*)(&((struct atom_master_list_of_data_tables_v2_1*)0)->FieldName)-(char*)0)/sizeof(uint16_t)) ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:1182:5: warning: no previous prototype for function 'vega10_pp_tables_initialize' [-Wmissing-prototypes] int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr) ^ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_processpptables.c:1182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr) ^ static 3 warnings generated. ..
vim +841 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/processpptables.c
3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 826 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 827 static const ATOM_PPLIB_POWERPLAYTABLE *get_powerplay_table( 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 828 struct pp_hwmgr *hwmgr) 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 829 { cf17039f489d3d drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Eric Huang 2016-05-31 830 const void *table_addr = hwmgr->soft_pp_table; 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 831 uint8_t frev, crev; 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 832 uint16_t size; 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 833 cf17039f489d3d drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Eric Huang 2016-05-31 834 if (!table_addr) { 741deade2a704a drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Alex Deucher 2018-09-13 835 if (hwmgr->chip_id == CHIP_RAVEN) { 3b4ca9e6494d19 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Rex Zhu 2017-08-24 836 table_addr = &soft_dummy_pp_table[0]; 3b4ca9e6494d19 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Rex Zhu 2017-08-24 837 hwmgr->soft_pp_table = &soft_dummy_pp_table[0]; 3b4ca9e6494d19 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Rex Zhu 2017-08-24 838 hwmgr->soft_pp_table_size = sizeof(soft_dummy_pp_table); 3b4ca9e6494d19 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Rex Zhu 2017-08-24 839 } else { b3892e2bb519fe drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Rex Zhu 2018-03-26 840 table_addr = smu_atom_get_data_table(hwmgr->adev, 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 @841 GetIndexIntoMasterTable(DATA, PowerPlayInfo), 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 842 &size, &frev, &crev); 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 843 hwmgr->soft_pp_table = table_addr; cf17039f489d3d drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Eric Huang 2016-05-31 844 hwmgr->soft_pp_table_size = size; cf17039f489d3d drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Eric Huang 2016-05-31 845 } 3b4ca9e6494d19 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Rex Zhu 2017-08-24 846 } 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 847 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 848 return (const ATOM_PPLIB_POWERPLAYTABLE *)table_addr; 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 849 } 3bace359149391 drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c Jammy Zhou 2015-07-21 850
:::::: The code at line 841 was first introduced by commit :::::: 3bace359149391c6547cefe3bf729f365bcf3ef6 drm/amd/powerplay: add hardware manager sub-component
:::::: TO: Jammy Zhou <Jammy.Zhou@amd.com> :::::: CC: Alex Deucher <alexander.deucher@amd.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |