[PATCH 1/2] drm/radeon: Using unsigned long instead of unsigned to fix possible overflow

Hanjun Guo guohanjun at huawei.com
Mon Nov 7 01:41:37 UTC 2022


On 2022/11/5 2:31, Alex Deucher wrote:
> On Fri, Nov 4, 2022 at 6:05 AM Hanjun Guo <guohanjun at huawei.com> wrote:
>>
>> VBIOSImageOffset in struct UEFI_ACPI_VFCT is ULONG (unsigned long),
>> but it will be assigned to "unsigned offset", so use unsigned long
>> instead of unsigned for the offset, to avoid possible overflow.
> 
> ULONG in atombios is 32 bits so an int should be fine.

I saw the typedef in the atombios.h is unsigned long but I missed
that the real one is uint32_t in atom-types.h, please drop this patch
and take a look at the PATCH 2/2.

Thanks for the prompt reply.

Thanks
Hanjun


More information about the amd-gfx mailing list