Commit 512a365
scsi: qla2xxx: Replace one-element array with DECLARE_FLEX_ARRAY() helper
One-element arrays as fake flex arrays are deprecated and we are moving
towards adopting C99 flexible-array members, instead. So, replace
one-element array declaration in struct ct_sns_gpnft_rsp, which is
ultimately being used inside a union:
drivers/scsi/qla2xxx/qla_def.h:
3240 struct ct_sns_gpnft_pkt {
3241 union {
3242 struct ct_sns_req req;
3243 struct ct_sns_gpnft_rsp rsp;
3244 } p;
3245 };
Refactor the rest of the code, accordingly.
This issue was found with the help of Coccinelle.
Link: KSPP/linux#245
Link: KSPP/linux#193
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/ZH+/rZ1R1cBjIxjS@work
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 8cd6d0a commit 512a365
2 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3174 | 3174 | | |
3175 | 3175 | | |
3176 | 3176 | | |
3177 | | - | |
| 3177 | + | |
3178 | 3178 | | |
3179 | 3179 | | |
3180 | 3180 | | |
3181 | 3181 | | |
3182 | | - | |
| 3182 | + | |
3183 | 3183 | | |
3184 | 3184 | | |
3185 | 3185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3776 | 3776 | | |
3777 | 3777 | | |
3778 | 3778 | | |
3779 | | - | |
3780 | | - | |
| 3779 | + | |
| 3780 | + | |
3781 | 3781 | | |
3782 | 3782 | | |
3783 | 3783 | | |
| |||
0 commit comments