|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/6] x86/EFI: adjust efi_multiboot2_prelude() to comply to Misra rule 18.2
On Wed, Sep 09, 2026 at 03:00:21PM +0200, Jan Beulich wrote: > While casting to pointer types may be more natural there, the subtraction > then ends up violating "Subtraction between pointers shall only be applied > to pointers that address elements of the same array". Use unsigned long > arithmetic instead. > > No functional change intended. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> I was going to propose pre-calculating mbi_raw + mbi->total_size and checking against that, but then checking for overflow would need to be explicit. So, your version indeed looks better. Acked-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab Attachment:
signature.asc
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |