From: Ping-Ke Shih <pkshih@realtek.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
kernel test robot <lkp@intel.com>,
"oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct rtw8814a_efuse) == 512"
Date: Mon, 13 Apr 2026 00:48:11 +0000 [thread overview]
Message-ID: <c09417ea7d534e2c812d470bd166fa3a@realtek.com> (raw)
In-Reply-To: <CAMuHMdWW=CFtTKG7ZqsULvo4hpOWh8miBZPemR6L2n1qCNvTWg@mail.gmail.com>
Hi Geert,
> Hi Ping-Ke,
>
> On Fri, 10 Apr 2026 at 14:15, Ping-Ke Shih <pkshih@realtek.com> wrote:
> > Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> > > On 10/04/2026 12:25, kernel test robot wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head: 9a9c8ce300cd3859cc87b408ef552cd697cc2ab7
> > > > commit: deb3ddeb18652118956fb581a39ac299e1ee5623 wifi: rtw88: Enable the new RTL8814AE/RTL8814AU
> drivers
> > > > date: 1 year, 1 month ago
> > > > config: arm-randconfig-001-20260410
> (https://download.01.org/0day-ci/archive/20260410/202604101721.fsv5XmCX-lkp@intel.com/config)
> > > > compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
> > > > reproduce (this is a W=1 build):
> (https://download.01.org/0day-ci/archive/20260410/202604101721.fsv5XmCX-lkp@intel.com/reproduce)
> > > >
> > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > > the same patch/commit), kindly add following tags
> > > > | Fixes: deb3ddeb1865 ("wifi: rtw88: Enable the new RTL8814AE/RTL8814AU drivers")
> > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202604101721.fsv5XmCX-lkp@intel.com/
> > > >
> > > > All errors (new ones prefixed by >>):
> > > >
> > > > 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"
> > >
> > > struct rtw_2g_txpwr_idx is missing __packed. Could that be the reason
> > > for the error? I don't see what else could be causing it.
> > >
> >
> > I also found that flaw, but it isn't cause. I download cross compiler
> > to build arm on my x86, and address the cause is:
> >
> > diff --git a/drivers/net/wireless/realtek/rtw88/rtw8814a.h
> b/drivers/net/wireless/realtek/rtw88/rtw8814a.h
> > index c57c7c8f915e..7f2260117487 100644
> > --- a/drivers/net/wireless/realtek/rtw88/rtw8814a.h
> > +++ b/drivers/net/wireless/realtek/rtw88/rtw8814a.h
> > @@ -51,10 +51,15 @@ struct rtw8814a_efuse {
> > union {
> > struct rtw8814au_efuse u;
> > struct rtw8814ae_efuse e;
> > - };
> > + } __packed;
>
> How can that make a difference?
> Both rtw8814au_efuse and rtw8814ae_efuse contain just (the same number
> of) bytes, so __packed on the union should not make any difference?
> Moreover, rtw8814au_efuse and rtw8814ae_efuse are already tagged with
> __packed, which should also not make any difference. Someone's been
> sprinkling too many __packed all over the place?
I have similar thought as yours, but arm-linux-gnueabi-gcc compiler seems
have special treatment with union. For this case, without __packed
the offset of followed field res5 will become 0xe0.
When investing this error, I also found another waning [1].
I don't know why the compiler treats the union so special, and I fix
them by experimental results.
[1] https://lore.kernel.org/linux-wireless/20260411072509.1556635-1-pkshih@realtek.com/T/#u
>
> > u8 res5[0x122]; /* 0xde */
> > } __packed;
> >
> > I will send a patch soon.
> >
> > Ping-Ke
>
> Gr{oetje,eeting}s,
>
> Geert
Ping-Ke
next prev parent reply other threads:[~2026-04-13 0:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 9:25 include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct rtw8814a_efuse) == 512" kernel test robot
2026-04-10 12:07 ` Bitterblue Smith
2026-04-10 12:14 ` Ping-Ke Shih
2026-04-11 15:29 ` Geert Uytterhoeven
2026-04-13 0:48 ` Ping-Ke Shih [this message]
2026-04-13 9:15 ` Geert Uytterhoeven
2026-04-13 9:30 ` Arnd Bergmann
2026-04-13 10:02 ` Geert Uytterhoeven
2026-04-13 13:01 ` David Laight
2026-04-13 13:46 ` Arnd Bergmann
2026-04-13 17:02 ` David Laight
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=c09417ea7d534e2c812d470bd166fa3a@realtek.com \
--to=pkshih@realtek.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.