linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()"
@ 2023-06-20  8:55 Su Hui
  2023-06-20 18:00 ` kernel test robot
  2023-06-21  6:11 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Su Hui @ 2023-06-20  8:55 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel
  Cc: dan.carpenter, Jane.Jian, Likun.Gao, David.Francis, amd-gfx,
	dri-devel, linux-kernel, kernel-janitors, Su Hui

use "__packed" is clearer amd better than “pragma pack()”.

Signed-off-by: Su Hui <suhui@nfschina.com>
---
As Dan Carpenter mentioned:
'"Mark the associated types properly packed individually, rather than
use the disgusting "pragma pack()" that should never be used."
https://lore.kernel.org/linux-sparse/CAHk-=wi7jGZ+bVbt-UfXOkpEQdHzF3Z2HBjkGdjh8q4dvPPGWQ@mail.gmail.com/'
use "__packed" is better.
the previous wrong patch's address:
https://lore.kernel.org/kernel-janitors/c12c4031-52fb-25a2-b411-e668eb9baaa2@tom.com/T/#t
 drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
index 24d42d24e6a0..025adc950026 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
@@ -83,8 +83,6 @@ enum amd_sriov_ucode_engine_id {
 	AMD_SRIOV_UCODE_ID__MAX
 };
 
-#pragma pack(push, 1) // PF2VF / VF2PF data areas are byte packed
-
 union amd_sriov_msg_feature_flags {
 	struct {
 		uint32_t error_log_collect : 1;
@@ -210,7 +208,7 @@ struct amd_sriov_msg_pf2vf_info {
 	uint32_t pcie_atomic_ops_support_flags;
 	/* reserved */
 	uint32_t reserved[256 - AMD_SRIOV_MSG_PF2VF_INFO_FILLED_SIZE];
-};
+} __packed;
 
 struct amd_sriov_msg_vf2pf_info_header {
 	/* the total structure size in byte */
@@ -263,7 +261,7 @@ struct amd_sriov_msg_vf2pf_info {
 	struct {
 		uint8_t id;
 		uint32_t version;
-	} ucode_info[AMD_SRIOV_MSG_RESERVE_UCODE];
+	} __packed ucode_info[AMD_SRIOV_MSG_RESERVE_UCODE];
 	uint64_t dummy_page_addr;
 
 	/* reserved */
@@ -301,8 +299,6 @@ enum amd_sriov_gpu_init_data_version {
 	GPU_INIT_DATA_READY_V1 = 1,
 };
 
-#pragma pack(pop) // Restore previous packing option
-
 /* checksum function between host and guest */
 unsigned int amd_sriov_msg_checksum(void *obj, unsigned long obj_size, unsigned int key,
 				    unsigned int checksum);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()"
  2023-06-20  8:55 [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()" Su Hui
@ 2023-06-20 18:00 ` kernel test robot
  2023-06-21  6:11 ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2023-06-20 18:00 UTC (permalink / raw)
  To: Su Hui, alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel
  Cc: oe-kbuild-all, Su Hui, Jane.Jian, David.Francis, kernel-janitors,
	linux-kernel, dri-devel, amd-gfx, Likun.Gao, dan.carpenter

Hi Su,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master v6.4-rc7 next-20230620]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Su-Hui/drm-amd-amdgpu-Use-__packed-instead-of-pragma-pack/20230620-165739
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20230620085543.576733-1-suhui%40nfschina.com
patch subject: [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()"
config: openrisc-randconfig-s051-20230620 (https://download.01.org/0day-ci/archive/20230621/202306210140.tAwPw0SG-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230621/202306210140.tAwPw0SG-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306210140.tAwPw0SG-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:485:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:500:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:546:21: sparse: sparse: cast removes address space '__user' of expression
--
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:579:42: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const [noderef] __user *__gu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse:     expected unsigned int const [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2347:21: sparse: sparse: cast removes address space '__user' of expression
--
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:153:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const [noderef] __user *__gu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse:     expected unsigned int const [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:155:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:282:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const [noderef] __user *__gu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse:     expected unsigned int const [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:284:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:330:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct amdgpu_debugfs_regs2_iocdata_v2 * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:330:46: sparse:     expected void const [noderef] __user *from
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:330:46: sparse:     got struct amdgpu_debugfs_regs2_iocdata_v2 *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:336:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct amdgpu_debugfs_regs2_iocdata * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:336:47: sparse:     expected void const [noderef] __user *from
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:336:47: sparse:     got struct amdgpu_debugfs_regs2_iocdata *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:460:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:488:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got struct amdgpu_debugfs_gprwave_iocdata * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:488:37: sparse:     expected void const [noderef] __user *from
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:488:37: sparse:     got struct amdgpu_debugfs_gprwave_iocdata *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:543:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const [noderef] __user *__gu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse:     expected unsigned int const [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:598:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:656:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const [noderef] __user *__gu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse:     expected unsigned int const [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:711:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:769:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int const [noderef] __user *__gu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse:     expected unsigned int const [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:824:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned int [noderef] __user *__pu_addr @@     got unsigned int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse:     expected unsigned int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse:     got unsigned int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:925:21: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1003:29: sparse: sparse: cast removes address space '__user' of expression
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1003:29: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1003:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected signed int [noderef] __user *__pu_addr @@     got signed int [usertype] * @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1003:29: sparse:     expected signed int [noderef] __user *__pu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1003:29: sparse:     got signed int [usertype] *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1003:29: sparse: sparse: too many warnings
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1808:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1808:25: sparse:    struct dma_fence [noderef] __rcu *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1808:25: sparse:    struct dma_fence *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1809:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1809:17: sparse:    struct dma_fence [noderef] __rcu *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1809:17: sparse:    struct dma_fence *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1868:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1868:17: sparse:    struct dma_fence [noderef] __rcu *
   drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1868:17: sparse:    struct dma_fence *
--
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:171:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:171:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:171:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:171:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:171:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:171:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:309:18: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:309:18: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:309:18: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:309:18: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:309:18: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:309:18: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:312:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *[addressable] cpu_addr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:312:29: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:312:29: sparse:     got void *[addressable] cpu_addr
--
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:457:25: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:574:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void *ptr @@
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:574:59: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:574:59: sparse:     got void *ptr
>> drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:623:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *ptr @@
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:623:37: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:623:37: sparse:     got void *ptr
   drivers/gpu/drm/amd/amdgpu/vce_v4_0.c:1081:27: sparse: sparse: symbol 'vce_v4_0_ip_funcs' was not declared. Should it be static?
--
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:275:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:275:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:275:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:275:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:275:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:275:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:280:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:280:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:280:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:280:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:280:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:280:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:281:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:281:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:281:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:281:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:281:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:281:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:306:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:306:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:306:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:306:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:306:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:306:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:307:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:307:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:307:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:307:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:307:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:307:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:308:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:308:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:308:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:308:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:308:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:308:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:314:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:314:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:314:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:314:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:314:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:314:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:320:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:320:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:320:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:320:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:320:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:320:28: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:458:75: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void *[assigned] ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:458:75: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:458:75: sparse:     got void *[assigned] ptr
>> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:487:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *[assigned] ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:487:45: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:487:45: sparse:     got void *[assigned] ptr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:498:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:498:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:498:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:498:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:498:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:498:42: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:500:70: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *cpu_addr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:500:70: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:500:70: sparse:     got void *cpu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:501:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:501:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:501:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:501:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:501:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:501:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:504:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:504:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:504:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:504:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:504:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:504:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:505:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:505:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:505:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:505:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:505:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:505:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:507:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *[assigned] ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:507:35: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:507:35: sparse:     got void *[assigned] ptr
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:769:35: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:769:35: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:769:35: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:769:35: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:769:35: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:769:35: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1204:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1204:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1204:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1205:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1205:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1205:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1206:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1206:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1206:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1207:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1207:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1207:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1208:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1208:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1208:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1209:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1209:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1209:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1210:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1210:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1210:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1211:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1211:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1211:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1212:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1212:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1212:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1213:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1213:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1213:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1214:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1214:17: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1214:17: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1216:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1216:24: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1216:24: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1240:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1240:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1240:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1241:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1241:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1241:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1242:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1242:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1242:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1243:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1243:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1243:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1245:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1245:24: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1245:24: sparse:     got restricted __le32 [usertype]
--
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:139:32: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:139:32: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:139:32: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:139:32: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:139:32: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:139:32: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:147:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:147:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:147:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:147:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:147:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:147:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:151:26: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:151:26: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:151:26: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:151:26: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:151:26: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:151:26: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:152:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:152:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:152:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:152:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:152:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:152:30: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:154:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:154:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:154:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:154:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:154:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:154:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:155:24: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:155:24: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:155:24: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:155:24: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:155:24: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:155:24: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:161:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:161:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:161:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:161:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:161:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:161:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:162:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:162:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:162:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:162:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:162:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:162:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:163:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:163:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:163:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:163:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:163:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:163:34: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:170:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:170:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:170:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:170:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:170:28: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:170:28: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:311:67: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void *[assigned] ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:311:67: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:311:67: sparse:     got void *[assigned] ptr
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:335:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *[assigned] ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:335:45: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:335:45: sparse:     got void *[assigned] ptr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:346:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:346:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:346:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:346:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:346:42: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:346:42: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:348:70: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *cpu_addr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:348:70: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:348:70: sparse:     got void *cpu_addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:349:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:349:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:349:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:349:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:349:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:349:53: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:352:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:352:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:352:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:352:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:352:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:352:41: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:353:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:353:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:353:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:353:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:353:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:353:40: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:355:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *[assigned] ptr @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:355:35: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:355:35: sparse:     got void *[assigned] ptr
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:583:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:583:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:583:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:584:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:584:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:584:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:585:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:585:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:585:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:586:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:586:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:586:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:587:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:587:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:587:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:588:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:588:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:588:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:589:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:589:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:589:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:590:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:590:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:590:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:591:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:591:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:591:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:592:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:592:16: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:592:16: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:593:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:593:17: sparse:     expected unsigned int [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:593:17: sparse:     got restricted __le32 [usertype]
   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c:594:17: sparse: sparse: too many warnings
--
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:65:25: sparse: sparse: cast to restricted __be32
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:74:26: sparse: sparse: cast to restricted __be32
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:411:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *kaddr @@
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:411:44: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:411:44: sparse:     got void *kaddr
--
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2343:60: sparse: sparse: cast to restricted __be32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1455:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] fps_high_t @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1455:32: sparse:     expected unsigned short [usertype] fps_high_t
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1455:32: sparse:     got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1463:31: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned char [usertype] fps_low_t @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1463:31: sparse:     expected unsigned char [usertype] fps_low_t
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1463:31: sparse:     got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:675:49: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] SclkFrequency @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:675:49: sparse:     expected unsigned int [usertype] SclkFrequency
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:675:49: sparse:     got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:703:44: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] MinVddNb @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:703:44: sparse:     expected unsigned int [usertype] MinVddNb
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:703:44: sparse:     got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:713:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] AT @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:713:38: sparse:     expected unsigned short [usertype] AT
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:713:38: sparse:     got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:788:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] low_sclk_interrupt_t @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:788:38: sparse:     expected unsigned int [usertype] low_sclk_interrupt_t
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:788:38: sparse:     got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:920:48: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] VclkFrequency @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:920:48: sparse:     expected unsigned int [usertype] VclkFrequency
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:920:48: sparse:     got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:921:48: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] DclkFrequency @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:921:48: sparse:     expected unsigned int [usertype] DclkFrequency
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:921:48: sparse:     got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:922:43: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinVddNb @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:922:43: sparse:     expected unsigned short [usertype] MinVddNb
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:922:43: sparse:     got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:991:44: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] Frequency @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:991:44: sparse:     expected unsigned int [usertype] Frequency
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:991:44: sparse:     got restricted __be32 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:992:45: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinVoltage @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:992:45: sparse:     expected unsigned short [usertype] MinVoltage
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:992:45: sparse:     got restricted __be16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1054:45: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] Frequency @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1054:45: sparse:     expected unsigned int [usertype] Frequency
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1054:45: sparse:     got restricted __be32 [usertype]
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1055:46: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinVoltage @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1055:46: sparse:     expected unsigned short [usertype] MinVoltage
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1055:46: sparse:     got restricted __be16 [usertype]
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1116:44: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] Frequency @@     got restricted __be32 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1116:44: sparse:     expected unsigned int [usertype] Frequency
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1116:44: sparse:     got restricted __be32 [usertype]
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1117:45: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] MinVoltage @@     got restricted __be16 [usertype] @@
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1117:45: sparse:     expected unsigned short [usertype] MinVoltage
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1117:45: sparse:     got restricted __be16 [usertype]
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2580:44: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2580:44: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2580:44: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2580:44: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2580:44: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2580:44: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2581:47: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2581:47: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2581:47: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2581:47: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2581:47: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2581:47: sparse: sparse: cast to restricted __le32
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2583:25: sparse: sparse: cast to restricted __le16
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2583:25: sparse: sparse: cast to restricted __le16
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2583:25: sparse: sparse: cast to restricted __le16
>> drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2583:25: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2596:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2596:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2596:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2596:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2596:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2596:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2603:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2603:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2603:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2603:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2603:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2603:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2605:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2605:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2605:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2605:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2605:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2605:33: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2607:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2607:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2607:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2607:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2607:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2607:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2662:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2662:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2662:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2662:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2662:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2662:21: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2663:22: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2663:22: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2663:22: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2663:22: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2664:23: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2664:23: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2664:23: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2664:23: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2667:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2667:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2667:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2667:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2667:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2667:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2668:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2668:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2668:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2668:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2668:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2668:29: sparse: sparse: cast to restricted __le32
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2691:16: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2691:16: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2691:16: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2691:16: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2730:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2730:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2730:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2730:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2733:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2733:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2733:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2733:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2736:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2736:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2736:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2736:18: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2785:24: sparse: sparse: cast to restricted __le16
   drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:2785:24: sparse: sparse: too many warnings

vim +485 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c

d38ceaf99ed015 Alex Deucher    2015-04-20  460  
4f4824b55650fa Tom St Denis    2016-04-27  461  /* Layout of file is 12 bytes consisting of
4f4824b55650fa Tom St Denis    2016-04-27  462   * - rptr
4f4824b55650fa Tom St Denis    2016-04-27  463   * - wptr
4f4824b55650fa Tom St Denis    2016-04-27  464   * - driver's copy of wptr
4f4824b55650fa Tom St Denis    2016-04-27  465   *
4f4824b55650fa Tom St Denis    2016-04-27  466   * followed by n-words of ring data
4f4824b55650fa Tom St Denis    2016-04-27  467   */
4f4824b55650fa Tom St Denis    2016-04-27  468  static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf,
4f4824b55650fa Tom St Denis    2016-04-27  469  					size_t size, loff_t *pos)
d38ceaf99ed015 Alex Deucher    2015-04-20  470  {
450630975da9e7 Al Viro         2016-12-04  471  	struct amdgpu_ring *ring = file_inode(f)->i_private;
4f4824b55650fa Tom St Denis    2016-04-27  472  	int r, i;
4f4824b55650fa Tom St Denis    2016-04-27  473  	uint32_t value, result, early[3];
d38ceaf99ed015 Alex Deucher    2015-04-20  474  
c71dbd93eb0039 Tom St Denis    2016-05-02  475  	if (*pos & 3 || size & 3)
4f4824b55650fa Tom St Denis    2016-04-27  476  		return -EINVAL;
d38ceaf99ed015 Alex Deucher    2015-04-20  477  
4f4824b55650fa Tom St Denis    2016-04-27  478  	result = 0;
c7e6be2303d0b6 Christian König 2016-01-21  479  
4f4824b55650fa Tom St Denis    2016-04-27  480  	if (*pos < 12) {
9c5c71bbed4132 Tom St Denis    2018-03-01  481  		early[0] = amdgpu_ring_get_rptr(ring) & ring->buf_mask;
ec63982e90a879 Tom St Denis    2017-03-29  482  		early[1] = amdgpu_ring_get_wptr(ring) & ring->buf_mask;
ec63982e90a879 Tom St Denis    2017-03-29  483  		early[2] = ring->wptr & ring->buf_mask;
4f4824b55650fa Tom St Denis    2016-04-27  484  		for (i = *pos / 4; i < 3 && size; i++) {
4f4824b55650fa Tom St Denis    2016-04-27 @485  			r = put_user(early[i], (uint32_t *)buf);
4f4824b55650fa Tom St Denis    2016-04-27  486  			if (r)
4f4824b55650fa Tom St Denis    2016-04-27  487  				return r;
4f4824b55650fa Tom St Denis    2016-04-27  488  			buf += 4;
4f4824b55650fa Tom St Denis    2016-04-27  489  			result += 4;
4f4824b55650fa Tom St Denis    2016-04-27  490  			size -= 4;
4f4824b55650fa Tom St Denis    2016-04-27  491  			*pos += 4;
4f4824b55650fa Tom St Denis    2016-04-27  492  		}
4f4824b55650fa Tom St Denis    2016-04-27  493  	}
d38ceaf99ed015 Alex Deucher    2015-04-20  494  
4f4824b55650fa Tom St Denis    2016-04-27  495  	while (size) {
4f4824b55650fa Tom St Denis    2016-04-27  496  		if (*pos >= (ring->ring_size + 12))
4f4824b55650fa Tom St Denis    2016-04-27  497  			return result;
d38ceaf99ed015 Alex Deucher    2015-04-20  498  
4f4824b55650fa Tom St Denis    2016-04-27  499  		value = ring->ring[(*pos - 12)/4];
4f4824b55650fa Tom St Denis    2016-04-27  500  		r = put_user(value, (uint32_t *)buf);
4f4824b55650fa Tom St Denis    2016-04-27  501  		if (r)
4f4824b55650fa Tom St Denis    2016-04-27  502  			return r;
4f4824b55650fa Tom St Denis    2016-04-27  503  		buf += 4;
4f4824b55650fa Tom St Denis    2016-04-27  504  		result += 4;
4f4824b55650fa Tom St Denis    2016-04-27  505  		size -= 4;
4f4824b55650fa Tom St Denis    2016-04-27  506  		*pos += 4;
d38ceaf99ed015 Alex Deucher    2015-04-20  507  	}
4f4824b55650fa Tom St Denis    2016-04-27  508  
4f4824b55650fa Tom St Denis    2016-04-27  509  	return result;
d38ceaf99ed015 Alex Deucher    2015-04-20  510  }
d38ceaf99ed015 Alex Deucher    2015-04-20  511  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()"
  2023-06-20  8:55 [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()" Su Hui
  2023-06-20 18:00 ` kernel test robot
@ 2023-06-21  6:11 ` Dan Carpenter
  2023-06-21  6:28   ` Su Hui
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2023-06-21  6:11 UTC (permalink / raw)
  To: oe-kbuild, Su Hui, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel
  Cc: lkp, oe-kbuild-all, Su Hui, Jane.Jian, David.Francis,
	kernel-janitors, linux-kernel, dri-devel, amd-gfx, Likun.Gao,
	dan.carpenter

When there was a #pragma then Sparse just turned off.  The Sparse
warnings are places where people forgot to put the __user in their casts
or didn't annotate endianness correctly.  It's not a "bug" to forget
to annotate endianness or user pointers.  That's how we used to do it
prior to 2003.  But these days it feels strange and dangerous to see
these sorts of warnings.

Smatch also disabled some uninitialized variable checks.  These are
mostly false positives where we have a loop:

	int r;

	while (something) {
		r = frob();
	}

	return r;

Smatch complains that we don't necessarily enter the loop.  I think
I'm going to disable this type of "enter the loop" warning when you
don't have the cross function database available.  That will silence
these for the kbuild bot.

regards,
dan carpenter

Hi Su,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Su-Hui/drm-amd-amdgpu-Use-__packed-instead-of-pragma-pack/20230620-165739
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20230620085543.576733-1-suhui%40nfschina.com
patch subject: [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()"
config: mips-randconfig-m031-20230620 (https://download.01.org/0day-ci/archive/20230621/202306210527.Oxvd2Jlz-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230621/202306210527.Oxvd2Jlz-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202306210527.Oxvd2Jlz-lkp@intel.com/

New smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5914 amdgpu_pci_slot_reset() error: uninitialized symbol 'memsize'.
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2244 amdgpu_fill_buffer() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c:55 amdgpu_benchmark_do_move() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:534 amdgpu_vram_mgr_new() error: uninitialized symbol 'cur_size'.
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:534 amdgpu_vram_mgr_new() error: uninitialized symbol 'size'.
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1274 amdgpu_ras_query_error_count() error: uninitialized symbol 'ret'.
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:141 amdgpu_securedisplay_debugfs_write() error: uninitialized symbol 'phy_id'.
drivers/gpu/drm/amd/amdgpu/aldebaran.c:103 aldebaran_mode2_suspend_ip() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/aldebaran.c:385 aldebaran_mode2_restore_hwcontext() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c:96 sienna_cichlid_mode2_suspend_ip() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c:95 smu_v13_0_10_mode2_suspend_ip() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c:612 mmhub_v2_0_update_medium_grain_clock_gating() error: uninitialized symbol 'def'.
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:1183 amdgpu_gfx_cp_init_microcode() error: uninitialized symbol 'ucode_fw'.
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:1184 amdgpu_gfx_cp_init_microcode() error: uninitialized symbol 'fw_size'.
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:594 sdma_v4_0_init_microcode() error: uninitialized symbol 'ret'.
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:251 sdma_v5_0_init_microcode() error: uninitialized symbol 'ret'.
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:1021 sdma_v5_0_ring_test_ring() error: uninitialized symbol 'index'.
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c:905 sdma_v6_0_ring_test_ring() error: uninitialized symbol 'index'.
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c:145 sdma_v4_4_2_init_microcode() error: uninitialized symbol 'ret'.
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c:1390 sdma_v4_4_2_sw_init() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:855 sdma_v5_2_ring_test_ring() error: uninitialized symbol 'index'.
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:361 vcn_v3_0_hw_init() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c:222 vcn_v4_0_3_hw_init() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:281 vcn_v4_0_hw_init() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:592 amdgpu_amdkfd_get_xgmi_bandwidth_mbytes() error: uninitialized symbol 'peer_adev'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1011 vangogh_get_dpm_ultimate_freq() error: uninitialized symbol 'mclk_mask'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1016 vangogh_get_dpm_ultimate_freq() error: uninitialized symbol 'soc_mask'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1021 vangogh_get_dpm_ultimate_freq() error: uninitialized symbol 'fclk_mask'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1026 vangogh_get_dpm_ultimate_freq() error: uninitialized symbol 'vclk_mask'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1031 vangogh_get_dpm_ultimate_freq() error: uninitialized symbol 'dclk_mask'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c:1085 smu_v13_0_0_get_od_setting_limits() error: uninitialized symbol 'od_min_setting'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c:1087 smu_v13_0_0_get_od_setting_limits() error: uninitialized symbol 'od_max_setting'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1076 smu_v13_0_7_get_od_setting_limits() error: uninitialized symbol 'od_min_setting'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1078 smu_v13_0_7_get_od_setting_limits() error: uninitialized symbol 'od_max_setting'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:121 __smu_cmn_poll_stat() error: uninitialized symbol 'reg'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:187 smu_get_mclk() error: uninitialized symbol 'clk_freq'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:201 smu_get_sclk() error: uninitialized symbol 'clk_freq'.

Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1344 amdgpu_device_resize_fb_bar() warn: impossible condition '(res->start > 4294967296) => (0-u32max > 4294967296)'
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2307 amdgpu_ras_recovery_init() warn: Please consider using kzalloc instead of kmalloc
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2579 amdgpu_ras_init() warn: Please consider using kzalloc instead of kmalloc
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:134 amdgpu_gfx_parse_disable_cu() warn: potential spectre issue 'mask' [w]
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:614 amdgpu_gfx_enable_kcq() warn: inconsistent indenting
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1879 sdma_v4_0_sw_init() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c:2580 smu_v13_0_0_check_ecc_table_support() warn: missing error code? 'ret'

vim +/memsize +5914 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5884  pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev)
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5885  {
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5886  	struct drm_device *dev = pci_get_drvdata(pdev);
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5887  	struct amdgpu_device *adev = drm_to_adev(dev);
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5888  	int r, i;
04442bf70debb1 Lijo Lazar        2021-03-16  5889  	struct amdgpu_reset_context reset_context;
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5890  	u32 memsize;
7ac71382e90aba Andrey Grodzovsky 2020-08-24  5891  	struct list_head device_list;
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5892  
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5893  	DRM_INFO("PCI error: slot reset callback!!\n");
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5894  
04442bf70debb1 Lijo Lazar        2021-03-16  5895  	memset(&reset_context, 0, sizeof(reset_context));
04442bf70debb1 Lijo Lazar        2021-03-16  5896  
7ac71382e90aba Andrey Grodzovsky 2020-08-24  5897  	INIT_LIST_HEAD(&device_list);
655ce9cb13b596 shaoyunl          2021-03-04  5898  	list_add_tail(&adev->reset_list, &device_list);
7ac71382e90aba Andrey Grodzovsky 2020-08-24  5899  
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5900  	/* wait for asic to come out of reset */
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5901  	msleep(500);
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5902  
7ac71382e90aba Andrey Grodzovsky 2020-08-24  5903  	/* Restore PCI confspace */
c1dd4aa624076c Andrey Grodzovsky 2020-08-24  5904  	amdgpu_device_load_pci_state(pdev);
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5905  
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5906  	/* confirm  ASIC came out of reset */
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5907  	for (i = 0; i < adev->usec_timeout; i++) {
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5908  		memsize = amdgpu_asic_get_config_memsize(adev);
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5909  
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5910  		if (memsize != 0xffffffff)
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5911  			break;
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5912  		udelay(1);
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5913  	}
362c7b91c1b00e Andrey Grodzovsky 2020-08-24 @5914  	if (memsize == 0xffffffff) {
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5915  		r = -ETIME;
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5916  		goto out;
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5917  	}
362c7b91c1b00e Andrey Grodzovsky 2020-08-24  5918  
04442bf70debb1 Lijo Lazar        2021-03-16  5919  	reset_context.method = AMD_RESET_METHOD_NONE;
04442bf70debb1 Lijo Lazar        2021-03-16  5920  	reset_context.reset_req_dev = adev;
04442bf70debb1 Lijo Lazar        2021-03-16  5921  	set_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
04442bf70debb1 Lijo Lazar        2021-03-16  5922  	set_bit(AMDGPU_SKIP_HW_RESET, &reset_context.flags);
04442bf70debb1 Lijo Lazar        2021-03-16  5923  
7afefb81b72cbc Andrey Grodzovsky 2021-05-21  5924  	adev->no_hw_access = true;
04442bf70debb1 Lijo Lazar        2021-03-16  5925  	r = amdgpu_device_pre_asic_reset(adev, &reset_context);
7afefb81b72cbc Andrey Grodzovsky 2021-05-21  5926  	adev->no_hw_access = false;
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5927  	if (r)
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5928  		goto out;
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5929  
04442bf70debb1 Lijo Lazar        2021-03-16  5930  	r = amdgpu_do_asic_reset(&device_list, &reset_context);
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5931  
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5932  out:
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5933  	if (!r) {
c1dd4aa624076c Andrey Grodzovsky 2020-08-24  5934  		if (amdgpu_device_cache_pci_state(adev->pdev))
c1dd4aa624076c Andrey Grodzovsky 2020-08-24  5935  			pci_restore_state(adev->pdev);
c1dd4aa624076c Andrey Grodzovsky 2020-08-24  5936  
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5937  		DRM_INFO("PCIe error recovery succeeded\n");
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5938  	} else {
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5939  		DRM_ERROR("PCIe error recovery failed, err:%d", r);
e923be9934a9c5 Andrey Grodzovsky 2022-01-25  5940  		amdgpu_device_unset_mp1_state(adev);
e923be9934a9c5 Andrey Grodzovsky 2022-01-25  5941  		amdgpu_device_unlock_reset_domain(adev->reset_domain);
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5942  	}
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5943  
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5944  	return r ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED;
c9a6b82f45e261 Andrey Grodzovsky 2020-07-29  5945  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()"
  2023-06-21  6:11 ` Dan Carpenter
@ 2023-06-21  6:28   ` Su Hui
  0 siblings, 0 replies; 4+ messages in thread
From: Su Hui @ 2023-06-21  6:28 UTC (permalink / raw)
  To: Dan Carpenter, oe-kbuild, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel
  Cc: lkp, oe-kbuild-all, Jane.Jian, David.Francis, kernel-janitors,
	linux-kernel, dri-devel, amd-gfx, Likun.Gao

On 2023/6/21 14:11, Dan Carpenter wrote:
> When there was a #pragma then Sparse just turned off.  The Sparse
> warnings are places where people forgot to put the __user in their casts
> or didn't annotate endianness correctly.  It's not a "bug" to forget
> to annotate endianness or user pointers.  That's how we used to do it
> prior to 2003.  But these days it feels strange and dangerous to see
> these sorts of warnings.
Got it. And it is really strange when I first saw these warnings.
Thanks for your explanation!

Su Hui

>
> Smatch also disabled some uninitialized variable checks.  These are
> mostly false positives where we have a loop:
>
> 	int r;
>
> 	while (something) {
> 		r = frob();
> 	}
>
> 	return r;
>
> Smatch complains that we don't necessarily enter the loop.  I think
> I'm going to disable this type of "enter the loop" warning when you
> don't have the cross function database available.  That will silence
> these for the kbuild bot.
>
> regards,
> dan carpenter
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-21  6:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20  8:55 [PATCH] drm/amd/amdgpu: Use “__packed“ instead of "pragma pack()" Su Hui
2023-06-20 18:00 ` kernel test robot
2023-06-21  6:11 ` Dan Carpenter
2023-06-21  6:28   ` Su Hui

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).