Messages in this thread | | | Date | Fri, 26 May 2023 10:41:59 -0700 | From | Kees Cook <> | Subject | Re: [PATCH v2][next] scsi: lpfc: Use struct_size() helper |
| |
On Tue, May 23, 2023 at 10:25:20PM -0700, Justin Tee wrote: > no_of_objects may be hardcoded to 1 right now, but does it make more > sense to use? > > struct_size(rap, obj, be32_to_cpu(rap->no_of_objects));
Oh yeah, that's nicer. :)
> We probably should have declared no_of_objects as __be32 to have > avoided this confusion.
Perhaps this patch can add that too?
-- Kees Cook
| |