The length is assigned before the first reference to the data flexible array (see ims_pcu_flash_firmware()), which allows for a straightforward annotation without further modifications. When at it, I also fixed an error message that repeats the word "input". Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx> --- Javier Carrasco (2): Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_by Input: ims-pcu - drop repeated "input" in error message drivers/input/misc/ims-pcu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- base-commit: 2102cb0d050d34d50b9642a3a50861787527e922 change-id: 20240619-ims-pcu-counted_by-7ff24a731073 Best regards, -- Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>