public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <rtl8821cerfe2@gmail.com>, <lkp@intel.com>
Subject: [PATCH rtw-next] wifi: rtw88: 8814a: add __packed to ensure efuse map size
Date: Fri, 10 Apr 2026 21:13:53 +0800	[thread overview]
Message-ID: <20260410131353.1550803-1-pkshih@realtek.com> (raw)

All nested sture/union used by efuse map should be packed. Otherwise, a
arm-linux-gnueabi-gcc compiler might throw errors due to size assertion.

   In file included from include/linux/bitfield.h:10,
                    from include/linux/fortify-string.h:5,
                    from include/linux/string.h:389,
                    from include/linux/uuid.h:11,
                    from include/linux/mod_devicetable.h:14,
                    from include/linux/usb.h:5,
                    from drivers/net/wireless/realtek/rtw88/rtw8814a.c:5:
>> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct rtw8814a_efuse) == 512"
    #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
                                            ^~~~~~~~~~~~~~

Fixes: 1a7545784642 ("wifi: rtw88: Add rtw8814a.{c,h}")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604101721.fsv5XmCX-lkp@intel.com/
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw88/main.h     | 2 +-
 drivers/net/wireless/realtek/rtw88/rtw8814a.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index 9c0b746540b0..3cc7c2666c1c 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -471,7 +471,7 @@ struct rtw_2g_txpwr_idx {
 	struct rtw_2g_ns_pwr_idx_diff ht_2s_diff;
 	struct rtw_2g_ns_pwr_idx_diff ht_3s_diff;
 	struct rtw_2g_ns_pwr_idx_diff ht_4s_diff;
-};
+} __packed;
 
 struct rtw_5g_ht_1s_pwr_idx_diff {
 #ifdef __LITTLE_ENDIAN
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8814a.h b/drivers/net/wireless/realtek/rtw88/rtw8814a.h
index c57c7c8f915e..a0d9446e2043 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8814a.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8814a.h
@@ -51,7 +51,7 @@ struct rtw8814a_efuse {
 	union {
 		struct rtw8814au_efuse u;
 		struct rtw8814ae_efuse e;
-	};
+	} __packed;
 	u8 res5[0x122];			/* 0xde */
 } __packed;
 

base-commit: 929298742bb5dfacd53ea99cf989cc81210f90a3
-- 
2.25.1


             reply	other threads:[~2026-04-10 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 13:13 Ping-Ke Shih [this message]
2026-04-10 15:44 ` [PATCH rtw-next] wifi: rtw88: 8814a: add __packed to ensure efuse map size Bitterblue Smith
2026-04-11  7:29   ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260410131353.1550803-1-pkshih@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox