From: Muhammad Usama Anjum Date: Thu, 11 Feb 2021 10:50:26 +0000 (+0500) Subject: staging: wfx: avoid defining array of flexible struct X-Git-Tag: accepted/tizen/unified/20230118.172025~7876^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e911c3d9dbc96b3e55fe1695107aff3671f53bd;p=platform%2Fkernel%2Flinux-rpi.git staging: wfx: avoid defining array of flexible struct In this particular case, the struct element is already flexible struct. Thus struct element ie[] is ambiguous inside another struct. The members of struct element ie aren't being accessed in code anywhere. The data of u8 type is copied in it. So it has been changed to u8 ie[] to make the sparse happy and code simple. Warning from sparse: drivers/stagingwfx/hif_tx.c: note: in included file (through drivers/stagingwfx/data_tx.h, drivers/staging//wfx/wfx.h): drivers/staging//wfx/hif_api_cmd.h:103:26: warning: array of flexible structures Reviewed-by: Jérôme Pouiller Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20210211105026.GA45458@LEGION Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 11bc1a5..58c9bb0 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -100,7 +100,7 @@ struct hif_req_update_ie { u8 reserved1:5; u8 reserved2; __le16 num_ies; - struct element ie[]; + u8 ie[]; } __packed; struct hif_cnf_update_ie {