Variable arrays should be defined as [], not [0], otherwise the kernel complains: memcpy : detected field-spanning write (size 9) of single field "param->set_program_ex.data" at drivers/platform/chrome/cros_ec_lightbar.c:603 (size 0)
Showing the changes to include/linux/platform_data (1 of 1 file). Show all
Unified · Split
| @@ -2028,7 +2028,7 @@ struct lightbar_program { · 2027 unmodified lines | ||
| 2028 | 2028 | struct lightbar_program_ex { |
| 2029 | 2029 | uint8_t size; |
| 2030 | 2030 | uint16_t offset; |
| 2031 | − uint8_t data[0]; | |
| 2031 | + uint8_t data[]; | |
| 2032 | 2032 | } __ec_todo_packed; |
| 2033 | 2033 | |
| 2034 | 2034 | struct ec_params_lightbar { |