Re: [PATCH] scsi: lpfc: Use struct_group to isolate cast to larger object
From: Martin K. Petersen
Date: Mon Dec 13 2021 - 23:32:21 EST
Kees,
> When building under -Warray-bounds, a warning is generated when casting
> a u32 into MAILBOX_t (which is larger). This warning is conservative, but
> it's not an unreasonable change to make to improve future robustness. Use
> a tagged struct_group that can refer to either the specific fields or
> the first u32 separately, silencing this warning:
Applied to 5.17/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering