mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 02:19:54 -04:00
drm/amdkfd: fix uint32 variable compared to less than zero
Currently the call to kfd_process_gpuidx_from_gpuid is returning an
int value and this is being assigned to a uint32_t variable gpuidx
and this is being checked for a negative error return which is always
going to be false. Fix this by making gpuidx an int32_t. This makes
gpuidx also type consistent with the use of gpuidx from the callers.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: cda0f85bfa ("drm/amdkfd: refine migration policy with xnack on")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
63f1af83ae
commit
65f8db8150
@@ -1330,7 +1330,7 @@ static void svm_range_unreserve_bos(struct svm_validate_context *ctx)
|
||||
*/
|
||||
static int svm_range_validate_and_map(struct mm_struct *mm,
|
||||
struct svm_range *prange,
|
||||
uint32_t gpuidx, bool intr, bool wait)
|
||||
int32_t gpuidx, bool intr, bool wait)
|
||||
{
|
||||
struct svm_validate_context ctx;
|
||||
struct hmm_range *hmm_range;
|
||||
|
||||
Reference in New Issue
Block a user