.. | .. |
---|
24 | 24 | |
---|
25 | 25 | #define SCLP_ATYPE_PCI 2 |
---|
26 | 26 | |
---|
| 27 | +#define SCLP_ERRNOTIFY_AQ_RESET 0 |
---|
27 | 28 | #define SCLP_ERRNOTIFY_AQ_REPAIR 1 |
---|
28 | 29 | #define SCLP_ERRNOTIFY_AQ_INFO_LOG 2 |
---|
29 | 30 | |
---|
.. | .. |
---|
38 | 39 | u8 atype; |
---|
39 | 40 | u32 fh; |
---|
40 | 41 | u32 fid; |
---|
41 | | - u8 data[0]; |
---|
| 42 | + u8 data[]; |
---|
42 | 43 | } __packed; |
---|
43 | 44 | |
---|
44 | 45 | struct err_notify_sccb { |
---|
.. | .. |
---|
111 | 112 | if (report->version != 1) |
---|
112 | 113 | return -EINVAL; |
---|
113 | 114 | |
---|
114 | | - if (report->action != SCLP_ERRNOTIFY_AQ_REPAIR && |
---|
115 | | - report->action != SCLP_ERRNOTIFY_AQ_INFO_LOG) |
---|
| 115 | + switch (report->action) { |
---|
| 116 | + case SCLP_ERRNOTIFY_AQ_RESET: |
---|
| 117 | + case SCLP_ERRNOTIFY_AQ_REPAIR: |
---|
| 118 | + case SCLP_ERRNOTIFY_AQ_INFO_LOG: |
---|
| 119 | + break; |
---|
| 120 | + default: |
---|
116 | 121 | return -EINVAL; |
---|
| 122 | + } |
---|
117 | 123 | |
---|
118 | 124 | if (report->length > (PAGE_SIZE - sizeof(struct err_notify_sccb))) |
---|
119 | 125 | return -EINVAL; |
---|