Re: [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg

From: kbuild test robot
Date: Mon Mar 04 2019 - 13:58:47 EST


Hi Luc,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0 next-20190304]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Luc-Van-Oostenryck/drm-amdgpu-fix-typing-in-amdgpu_virt_ops-trans_msg/20190305-001104
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.2.0
reproduce:
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
GCC_VERSION=8.2.0 make.cross ARCH=ia64

All error/warnings (new ones prefixed by >>):

In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:77,
from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amd_powerplay.h:33,
from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/hwmgr.h:27,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_thermal.h:27,
from drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_thermal.c:24:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h:59:53: warning: 'enum idh_request' declared inside parameter list will not be visible outside of this definition or declaration
void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req, u32 data1, u32 data2, u32 data3);
^~~~~~~~~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:77,
from drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c:24:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h:59:53: warning: 'enum idh_request' declared inside parameter list will not be visible outside of this definition or declaration
void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req, u32 data1, u32 data2, u32 data3);
^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c: In function 'amdgpu_vf_error_trans_all':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c:82:35: error: type of formal parameter 2 is incomplete
adev->virt.ops->trans_msg(adev, IDH_LOG_VF_ERROR, data1, data2, data3);
^~~~~~~~~~~~~~~~
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:77,
from drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:24:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h:59:53: warning: 'enum idh_request' declared inside parameter list will not be visible outside of this definition or declaration
void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req, u32 data1, u32 data2, u32 data3);
^~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:376:15: error: initialization of 'void (*)(struct amdgpu_device *, enum idh_request, u32, u32, u32)' {aka 'void (*)(struct amdgpu_device *, enum idh_request, unsigned int, unsigned int, unsigned int)'} from incompatible pointer type 'void (*)(struct amdgpu_device *, enum idh_request, u32, u32, u32)' {aka 'void (*)(struct amdgpu_device *, enum idh_request, unsigned int, unsigned int, unsigned int)'} [-Werror=incompatible-pointer-types]
.trans_msg = xgpu_ai_mailbox_trans_msg,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:376:15: note: (near initialization for 'xgpu_ai_virt_ops.trans_msg')
cc1: some warnings being treated as errors

vim +376 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c

f98b617e Monk Liu 2017-04-05 370
c9c9de93 Xiangliang Yu 2017-03-10 371 const struct amdgpu_virt_ops xgpu_ai_virt_ops = {
c9c9de93 Xiangliang Yu 2017-03-10 372 .req_full_gpu = xgpu_ai_request_full_gpu_access,
c9c9de93 Xiangliang Yu 2017-03-10 373 .rel_full_gpu = xgpu_ai_release_full_gpu_access,
f98b617e Monk Liu 2017-04-05 374 .reset_gpu = xgpu_ai_request_reset,
b5914238 pding 2017-10-24 375 .wait_reset = NULL,
89041940 Gavin Wan 2017-06-23 @376 .trans_msg = xgpu_ai_mailbox_trans_msg,

:::::: The code at line 376 was first introduced by commit
:::::: 890419409a3aba2ca7185a824e47d8ded8df11a2 drm/amdgpu: Support passing amdgpu critical error to host via GPU Mailbox.

:::::: TO: Gavin Wan <Gavin.Wan@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip