mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-06 07:50:18 +00:00
Including an aligned structure inside of a packed one is ambiguous
and can lead to misaligned data, as pointed out by this clang warning:
drivers/net/wireless/ath/ath10k/htt.h:715:34: error: field prefix within 'struct htt_rx_indication' is less aligned than 'struct htt_rx_indication_prefix' and is usually due to 'struct htt_rx_indication' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
struct htt_rx_indication_prefix prefix;
^
drivers/net/wireless/ath/ath10k/htt.h:736:34: error: field prefix within 'struct htt_rx_indication_hl' is less aligned than 'struct htt_rx_indication_prefix' and is usually due to 'struct htt_rx_indication_hl' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
struct htt_rx_indication_prefix prefix;
^
drivers/net/wireless/ath/ath10k/htt.h:1564:2: error: field within 'struct htt_tx_fetch_ind' is less aligned than 'union htt_tx_fetch_ind::(anonymous at drivers/net/wireless/ath/ath10k/htt.h:1564:2)' and is usually due to 'struct htt_tx_fetch_ind' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
union {
^
drivers/net/wireless/ath/ath10k/htt.h:1702:2: error: field within 'struct htt_resp' is less aligned than 'union htt_resp::(anonymous at drivers/net/wireless/ath/ath10k/htt.h:1702:2)' and is usually due to 'struct htt_resp' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access]
These structures appear to actually need the packing since they
are embedded at misaligned offsets. Add even more such annotations
here to enforce bytewise access throughout the driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230616090439.2484857-1-arnd@kernel.org
|
||
|---|---|---|
| .. | ||
| ahb.c | ||
| ahb.h | ||
| bmi.c | ||
| bmi.h | ||
| ce.c | ||
| ce.h | ||
| core.c | ||
| core.h | ||
| coredump.c | ||
| coredump.h | ||
| debug.c | ||
| debug.h | ||
| debugfs_sta.c | ||
| hif.h | ||
| htc.c | ||
| htc.h | ||
| htt_rx.c | ||
| htt_tx.c | ||
| htt.c | ||
| htt.h | ||
| hw.c | ||
| hw.h | ||
| Kconfig | ||
| mac.c | ||
| mac.h | ||
| Makefile | ||
| p2p.c | ||
| p2p.h | ||
| pci.c | ||
| pci.h | ||
| qmi_wlfw_v01.c | ||
| qmi_wlfw_v01.h | ||
| qmi.c | ||
| qmi.h | ||
| rx_desc.h | ||
| sdio.c | ||
| sdio.h | ||
| snoc.c | ||
| snoc.h | ||
| spectral.c | ||
| spectral.h | ||
| swap.c | ||
| swap.h | ||
| targaddrs.h | ||
| testmode_i.h | ||
| testmode.c | ||
| testmode.h | ||
| thermal.c | ||
| thermal.h | ||
| trace.c | ||
| trace.h | ||
| txrx.c | ||
| txrx.h | ||
| usb.c | ||
| usb.h | ||
| wmi-ops.h | ||
| wmi-tlv.c | ||
| wmi-tlv.h | ||
| wmi.c | ||
| wmi.h | ||
| wow.c | ||
| wow.h | ||