* [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg
@ 2019-03-04 13:10 Luc Van Oostenryck
2019-03-04 18:58 ` kbuild test robot
2019-03-04 22:54 ` Luc Van Oostenryck
0 siblings, 2 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2019-03-04 13:10 UTC (permalink / raw)
To: amd-gfx
Cc: Alex Deucher, Christian König, David Zhou, David Airlie,
Daniel Vetter, Rex Zhu, Monk Liu, Emily Deng, dri-devel,
linux-kernel, Luc Van Oostenryck
The method in struct amdgpu_virt_ops::trans_msg() is defined as
using an 'u32' for its 2nd argument (the request) but the actual
implementation()s and calls use an 'enum idh_request' for it.
Fix this by using 'enum idh_request' for the method declaration too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index 722deefc0a7e..3e9aec6f2795 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
@@ -56,7 +56,7 @@ struct amdgpu_virt_ops {
int (*rel_full_gpu)(struct amdgpu_device *adev, bool init);
int (*reset_gpu)(struct amdgpu_device *adev);
int (*wait_reset)(struct amdgpu_device *adev);
- void (*trans_msg)(struct amdgpu_device *adev, u32 req, u32 data1, u32 data2, u32 data3);
+ void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req, u32 data1, u32 data2, u32 data3);
};
/*
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg
2019-03-04 13:10 [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg Luc Van Oostenryck
@ 2019-03-04 18:58 ` kbuild test robot
2019-03-04 22:54 ` Luc Van Oostenryck
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2019-03-04 18:58 UTC (permalink / raw)
To: Luc Van Oostenryck
Cc: kbuild-all, amd-gfx, Alex Deucher, Christian König,
David Zhou, David Airlie, Daniel Vetter, Rex Zhu, Monk Liu,
Emily Deng, dri-devel, linux-kernel, Luc Van Oostenryck
[-- Attachment #1: Type: text/plain, Size: 4581 bytes --]
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@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52820 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg
2019-03-04 13:10 [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg Luc Van Oostenryck
2019-03-04 18:58 ` kbuild test robot
@ 2019-03-04 22:54 ` Luc Van Oostenryck
1 sibling, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2019-03-04 22:54 UTC (permalink / raw)
To: amd-gfx
Cc: Alex Deucher, Christian König, David Zhou, David Airlie,
Daniel Vetter, Rex Zhu, Monk Liu, Emily Deng, dri-devel,
linux-kernel
On Mon, Mar 04, 2019 at 02:10:00PM +0100, Luc Van Oostenryck wrote:
> The method in struct amdgpu_virt_ops::trans_msg() is defined as
> using an 'u32' for its 2nd argument (the request) but the actual
> implementation()s and calls use an 'enum idh_request' for it.
>
> Fix this by using 'enum idh_request' for the method declaration too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> index 722deefc0a7e..3e9aec6f2795 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
> @@ -56,7 +56,7 @@ struct amdgpu_virt_ops {
> int (*rel_full_gpu)(struct amdgpu_device *adev, bool init);
> int (*reset_gpu)(struct amdgpu_device *adev);
> int (*wait_reset)(struct amdgpu_device *adev);
> - void (*trans_msg)(struct amdgpu_device *adev, u32 req, u32 data1, u32 data2, u32 data3);
> + void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req, u32 data1, u32 data2, u32 data3);
> };
Sorry, this is patch is incorrect. Please ignore it.
-- Luc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-04 22:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 13:10 [PATCH] drm/amdgpu: fix typing in amdgpu_virt_ops::trans_msg Luc Van Oostenryck
2019-03-04 18:58 ` kbuild test robot
2019-03-04 22:54 ` Luc Van Oostenryck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).