bianbu-linux-6.6/drivers/net/wireless/broadcom/b43legacy
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
..
b43legacy.h wifi: b43: fix incorrect __packed annotation 2023-05-17 09:24:09 +03:00
debugfs.c b43legacy: don't save dentries for debugfs 2021-05-21 20:46:37 +02:00
debugfs.h b43legacy: don't save dentries for debugfs 2021-05-21 20:46:37 +02:00
dma.c wifi: b43legacy: Remove the unused function prev_slot() 2023-04-03 16:42:36 +03:00
dma.h
ilt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
ilt.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
main.c wifi: mac80211: add wake_tx_queue callback to drivers 2022-10-10 11:00:03 +02:00
main.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
Makefile
phy.c b43legacy: Fix assigning negative value to unsigned variable 2022-04-06 15:13:08 +03:00
phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
pio.c b43legacy: convert tasklets to use new tasklet_setup() API 2020-08-27 16:22:04 +03:00
pio.h
radio.c wifi: b43legacy: remove unused freq_r3A_value function 2023-03-31 17:50:09 +03:00
radio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
rfkill.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 20 2019-05-21 11:28:46 +02:00
rfkill.h
sysfs.c b43legacy: replace simple_strtol() with kstrtoint() 2020-03-12 15:40:45 +02:00
sysfs.h
xmit.c b43legacy: Fix case where channel status is corrupted 2020-04-14 18:07:44 +03:00
xmit.h