From: Tom Rix <[email protected]>
When CONFIG_HSA_AMD=n this there is this error
amdgpu_amdkfd.c:75:56: error: incompatible type for
argument 2 of ‘kgd2kfd_probe’
75 | adev->kfd.dev = kgd2kfd_probe((struct kgd_dev *)adev, vf);
amdgpu_amdkfd.h:349:17: note: declared here
349 | struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd,
struct pci_dev *pdev,
The signature of the stub kgd2kfd_probe() does not match the real one.
So change the stub to match.
Fixes: 920f37e6a3fc ("drm/amdkfd: clean up parameters in kgd2kfd_probe")
Signed-off-by: Tom Rix <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
index 38d883dffc20..69de31754907 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
@@ -346,8 +346,7 @@ static inline void kgd2kfd_exit(void)
}
static inline
-struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev,
- unsigned int asic_type, bool vf)
+struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
{
return NULL;
}
--
2.26.3
On Thu, Sep 30, 2021 at 4:35 PM <[email protected]> wrote:
>
> From: Tom Rix <[email protected]>
>
> When CONFIG_HSA_AMD=n this there is this error
> amdgpu_amdkfd.c:75:56: error: incompatible type for
> argument 2 of ‘kgd2kfd_probe’
> 75 | adev->kfd.dev = kgd2kfd_probe((struct kgd_dev *)adev, vf);
>
> amdgpu_amdkfd.h:349:17: note: declared here
> 349 | struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd,
> struct pci_dev *pdev,
>
> The signature of the stub kgd2kfd_probe() does not match the real one.
> So change the stub to match.
>
> Fixes: 920f37e6a3fc ("drm/amdkfd: clean up parameters in kgd2kfd_probe")
> Signed-off-by: Tom Rix <[email protected]>
Anson fixed this up earlier today. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
> index 38d883dffc20..69de31754907 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
> @@ -346,8 +346,7 @@ static inline void kgd2kfd_exit(void)
> }
>
> static inline
> -struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev,
> - unsigned int asic_type, bool vf)
> +struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
> {
> return NULL;
> }
> --
> 2.26.3
>
Hi,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15-rc3 next-20210922]
[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/trix-redhat-com/drm-amdkfd-match-the-signatures-of-the-real-and-stub-kgd2kfd_probe/20211001-043648
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 02d5e016800d082058b3d3b7c3ede136cdc6ddcb
config: riscv-randconfig-r042-20211001 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 962e503cc8bc411f7523cc393acae8aae425b1c4)
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/f110a72ee42592cc2f841f5c345ffe7e0b831124
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review trix-redhat-com/drm-amdkfd-match-the-signatures-of-the-real-and-stub-kgd2kfd_probe/20211001-043648
git checkout f110a72ee42592cc2f841f5c345ffe7e0b831124
# 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=riscv SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:74:23: error: too many arguments to function call, expected 2, have 4
adev->pdev, adev->asic_type, vf);
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_amdkfd.h:349:17: note: 'kgd2kfd_probe' declared here
struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
^
1 error generated.
vim +74 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
5c33f214db87b3 Felix Kuehling 2017-07-28 65
5c33f214db87b3 Felix Kuehling 2017-07-28 66 void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev)
5c33f214db87b3 Felix Kuehling 2017-07-28 67 {
050091ab6e832f Yong Zhao 2019-09-03 68 bool vf = amdgpu_sriov_vf(adev);
5c33f214db87b3 Felix Kuehling 2017-07-28 69
c7651b73586600 Felix Kuehling 2020-09-16 70 if (!kfd_initialized)
c7651b73586600 Felix Kuehling 2020-09-16 71 return;
c7651b73586600 Felix Kuehling 2020-09-16 72
8e07e2676a42e7 Amber Lin 2018-12-13 73 adev->kfd.dev = kgd2kfd_probe((struct kgd_dev *)adev,
e392c887df9791 Yong Zhao 2019-09-27 @74 adev->pdev, adev->asic_type, vf);
611736d8447c0c Felix Kuehling 2018-11-19 75
611736d8447c0c Felix Kuehling 2018-11-19 76 if (adev->kfd.dev)
611736d8447c0c Felix Kuehling 2018-11-19 77 amdgpu_amdkfd_total_mem_size += adev->gmc.real_vram_size;
130e0371b7d454 Oded Gabbay 2015-06-12 78 }
130e0371b7d454 Oded Gabbay 2015-06-12 79
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]