Commit bb26224
scsi: lpfc: Use struct_size() helper
Prefer struct_size() over open-coded versions of idiom:
sizeof(struct-with-flex-array) + sizeof(typeof-flex-array-elements) * count
where count is the max number of items the flexible array is supposed to
contain.
Link: KSPP/linux#160
Co-developed-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Co-developed-by: Kees Cook <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Justin Tee <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 9c24f90 commit bb26224
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3748 | 3748 | | |
3749 | 3749 | | |
3750 | 3750 | | |
3751 | | - | |
3752 | | - | |
| 3751 | + | |
3753 | 3752 | | |
3754 | 3753 | | |
3755 | 3754 | | |
| |||
3768 | 3767 | | |
3769 | 3768 | | |
3770 | 3769 | | |
3771 | | - | |
3772 | | - | |
| 3770 | + | |
3773 | 3771 | | |
3774 | 3772 | | |
3775 | 3773 | | |
| |||
0 commit comments