Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/chrome: lightbar: Use flexible array member

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)

Fixes: 9600b8bdbfe4 ("platform/chrome: lightbar: Add support for large sequence")
Signed-off-by: Gwendal Grignou <gwendal@google.com>
Link: https://lore.kernel.org/r/20260204034848.697033-1-gwendal@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>

authored by

Gwendal Grignou and committed by
Tzung-Bi Shih
520e345d d55493f6

+1 -1
+1 -1
include/linux/platform_data/cros_ec_commands.h
··· 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 {