[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220414104323.6152-9-straube.linux@gmail.com>
Date: Thu, 14 Apr 2022 12:43:23 +0200
From: Michael Straube <straube.linux@...il.com>
To: gregkh@...uxfoundation.org
Cc: Larry.Finger@...inger.net, phil@...lpotter.co.uk,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Michael Straube <straube.linux@...il.com>,
David Laight <David.Laight@...LAB.COM>
Subject: [PATCH v2 8/8] staging: r8188eu: check rt_firmware_hdr size at compile time
Check the size of struct rt_firmware_hdr at compile time since
we rely on the size to be 32 in rtl8188e_firmware_download().
Suggested-by: David Laight <David.Laight@...LAB.COM>
Signed-off-by: Michael Straube <straube.linux@...il.com>
---
drivers/staging/r8188eu/core/rtw_fw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188eu/core/rtw_fw.c
index c58bce1a1856..4417375a158d 100644
--- a/drivers/staging/r8188eu/core/rtw_fw.c
+++ b/drivers/staging/r8188eu/core/rtw_fw.c
@@ -34,6 +34,8 @@ struct rt_firmware_hdr {
__le32 rsvd5;
};
+static_assert(sizeof(struct rt_firmware_hdr) == 32);
+
static void fw_download_enable(struct adapter *padapter, bool enable)
{
u8 tmp;
--
2.35.1
Powered by blists - more mailing lists