From f582e0009c730403a3b2a0592619bb87b5a54898 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 3 Jan 2024 16:16:19 +0200 Subject: [PATCH] qmi: fix dynamic array macro The macro was using the parameter for referencing the length field, which used the same suffix as the parameter name. Rename the length parameter to correctly access the length field. Signed-off-by: David Bauer --- common/qmi-message.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/qmi-message.h b/common/qmi-message.h index ed23387..a619478 100644 --- a/common/qmi-message.h +++ b/common/qmi-message.h @@ -92,8 +92,8 @@ .data._field##_n = ARRAY_SIZE(_val), \ .data._field = (_val) -#define QMI_INIT_ARRAY(_field, _val, _n) \ - .data._field##_n = (_n), \ +#define QMI_INIT_ARRAY(_field, _val, _num_elems) \ + .data._field##_n = (_num_elems), \ .data._field = (_val) -- 2.30.2