[PATCH] drm/amdgpu: Fix warnings

Chen, Guchun Guchun.Chen at amd.com
Thu Apr 6 01:33:39 UTC 2023


Reviewed-by: Guchun Chen <guchun.chen at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Lijo
> Lazar
> Sent: Wednesday, April 5, 2023 5:46 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; kernel test robot
> <lkp at intel.com>; Zhang, Hawking <Hawking.Zhang at amd.com>
> Subject: [PATCH] drm/amdgpu: Fix warnings
> 
> Fix below warning due to incompatible types in conditional operator
> 
> ../pm/swsmu/smu13/smu_v13_0_6_ppt.c:315:17: sparse: sparse:
> incompatible types in conditional expression (different base types):
> 
> Signed-off-by: Lijo Lazar <lijo.lazar at amd.com>
> Reported-by: kernel test robot <lkp at intel.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202303082135.NjdX1Bij-
> lkp at intel.com/
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index bbac4239ceb3..376d14de7602 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1241,7 +1241,7 @@ int emu_soc_asic_init(struct amdgpu_device
> *adev);
>  	((adev)->asic_funcs->flush_hdp ? (adev)->asic_funcs-
> >flush_hdp((adev), (r)) : (adev)->hdp.funcs->flush_hdp((adev), (r)))  #define
> amdgpu_asic_invalidate_hdp(adev, r) \
>  	((adev)->asic_funcs->invalidate_hdp ? (adev)->asic_funcs-
> >invalidate_hdp((adev), (r)) : \
> -	 ((adev)->hdp.funcs->invalidate_hdp ? (adev)->hdp.funcs-
> >invalidate_hdp((adev), (r)) : 0))
> +	 ((adev)->hdp.funcs->invalidate_hdp ?
> +(adev)->hdp.funcs->invalidate_hdp((adev), (r)) : (void)0))
>  #define amdgpu_asic_need_full_reset(adev) (adev)->asic_funcs-
> >need_full_reset((adev))
>  #define amdgpu_asic_init_doorbell_index(adev) (adev)->asic_funcs-
> >init_doorbell_index((adev))
>  #define amdgpu_asic_get_pcie_usage(adev, cnt0, cnt1) ((adev)->asic_funcs-
> >get_pcie_usage((adev), (cnt0), (cnt1)))
> --
> 2.25.1



More information about the amd-gfx mailing list