drm/amdkfd: sparse: Fix warning in reading SDMA counters
authorMukul Joshi <mukul.joshi@amd.com>
Tue, 18 Aug 2020 18:51:41 +0000 (14:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Aug 2020 16:22:32 +0000 (12:22 -0400)
commit818b032433a345b2f5466660ae054806343263e5
tree4cb51d472af01b54d90524aabe35c83e1ec082fb
parent37d0474542850e6bb70b226487b4202d21bfe7cc
drm/amdkfd: sparse: Fix warning in reading SDMA counters

Add __user annotation to fix related sparse warning while reading
SDMA counters from userland.
Also, rework the read SDMA counters function by removing redundant
checks.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c