Hello Felix Kuehling,

Commit 7e38ccb5276f ("drm/amdkfd: Fix eviction fence handling") from
Apr 17, 2024 (linux-next), leads to the following Smatch static
checker warning:

        drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:2099 
signal_eviction_fence()
        warn: '(-22)' is not bool

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c
    2090 static bool signal_eviction_fence(struct kfd_process *p)
                ^^^^

    2091 {
    2092         struct dma_fence *ef;
    2093         bool ret;
    2094 
    2095         rcu_read_lock();
    2096         ef = dma_fence_get_rcu_safe(&p->ef);
    2097         rcu_read_unlock();
    2098         if (!ef)
--> 2099                 return -EINVAL;

This should be either true or false.  Probably true because presumably
it has been tested?

    2100 
    2101         ret = dma_fence_check_and_signal(ef);
    2102         dma_fence_put(ef);
    2103 
    2104         return ret;
    2105 }

regards,
dan carpenter

Reply via email to