[PATCH] drm/amd/amdgpu: Fix logic bug in fatal error handling

Luben Tuikov luben.tuikov at amd.com
Thu Mar 23 13:54:21 UTC 2023


On 2023-03-23 09:29, Christian König wrote:
> Am 23.03.23 um 13:04 schrieb Srinivasan Shanmugam:
>> CC      drivers/gpu/drm/amd/amdgpu/amdgpu_ras.o
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2567:28: error: bitwise or with non-zero value always evaluates to true [-Werror,-Wtautological-bitwise-compare]
>>                if (adev->ras_hw_enabled | AMDGPU_RAS_BLOCK__DF)
>>                    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
>>
>> Presumably the author intended to test if AMDGPU_RAS_BLOCK__DF
>> bit was set if ras is enabled, so that's what I'm changing the
>> code to. Hopefully to do the right thing.
> 
> That looks like a nice catch to me, but I don't really know the ras code 
> that well.
> 
> Hawking, Luben or whoever is more familiar with that should probably 
> comment as well.

Thanks Christian--yeah, it looks like a typo. Fix is already committed
into amd-staging-drm-next.
-- 
Regards,
Luben



More information about the amd-gfx mailing list