1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/broadcom/b43
Arnd Bergmann 212457ccbd wifi: b43: fix incorrect __packed annotation
clang warns about an unpacked structure inside of a packed one:

drivers/net/wireless/broadcom/b43/b43.h:654:4: error: field data within 'struct b43_iv' is less aligned than 'union (unnamed union at /home/arnd/arm-soc/drivers/net/wireless/broadcom/b43/b43.h:651:2)' and is usually due to 'struct b43_iv' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]

The problem here is that the anonymous union has the default alignment
from its members, apparently because the original author mixed up the
placement of the __packed attribute by placing it next to the struct
member rather than the union definition. As the struct itself is
also marked as __packed, there is no need to mark its members, so just
move the annotation to the inner type instead.

As Michael noted, the same problem is present in b43legacy, so
change both at the same time.

Acked-by: Michael Büsch <m@bues.ch>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/oe-kbuild-all/202305160749.ay1HAoyP-lkp@intel.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230516183442.536589-1-arnd@kernel.org
2023-05-17 09:24:09 +03:00
..
b43.h wifi: b43: fix incorrect __packed annotation 2023-05-17 09:24:09 +03:00
bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
bus.h
debugfs.c b43: don't save dentries for debugfs 2021-05-21 20:46:41 +02:00
debugfs.h b43: don't save dentries for debugfs 2021-05-21 20:46:41 +02:00
dma.c b43: Use fallthrough pseudo-keyword 2020-08-27 16:08:22 +03:00
dma.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
leds.c wifi: move from strlcpy with unused retval to strscpy 2022-09-02 11:47:22 +03:00
leds.h
lo.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
lo.h
main.c wifi: b43: remove reference to removed config B43_PCMCIA 2022-11-28 15:57:29 +02:00
main.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
Makefile
phy_a.h
phy_ac.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
phy_ac.h
phy_common.c b43: phy_common: Demote non-conformant kerneldoc header 2020-08-27 15:15:37 +03:00
phy_common.h wifi: b43: fix repeated words in comments 2022-07-18 15:07:27 +03:00
phy_g.c b43: fix a lower bounds test 2021-10-11 09:09:30 +03:00
phy_g.h
phy_ht.c b43: phy_ht: Remove 9 year old TODO 2020-09-01 12:22:38 +03:00
phy_ht.h
phy_lcn.c
phy_lcn.h
phy_lp.c b43: Replace HTTP links with HTTPS ones 2020-08-02 18:16:35 +03:00
phy_lp.h
phy_n.c wifi: b43: remove empty switch statement 2022-09-07 11:03:00 +03:00
phy_n.h
pio.c b43: Use fallthrough pseudo-keyword 2020-08-27 16:08:22 +03:00
pio.h
ppr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
ppr.h
radio_2055.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
radio_2055.h
radio_2056.c b43: Replace HTTP links with HTTPS ones 2020-08-02 18:16:35 +03:00
radio_2056.h
radio_2057.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
radio_2057.h
radio_2059.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
radio_2059.h
rfkill.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
rfkill.h
sdio.c mmc: sdio: Move SDIO IDs from b43-sdio driver to common include file 2020-05-29 12:37:59 +02:00
sdio.h
sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
sysfs.h
tables.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables.h
tables_lpphy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables_lpphy.h
tables_nphy.c b43: Use fallthrough pseudo-keyword 2020-08-27 16:08:22 +03:00
tables_nphy.h
tables_phy_ht.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables_phy_ht.h
tables_phy_lcn.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
tables_phy_lcn.h
wa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
wa.h
xmit.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
xmit.h