Skip to contentSkip to conversation

ath11k: Use sizeof_field() instead of FIELD_SIZEOF()

PATCH In review Kees Cook 2 participants 3 messages Dec 19, 2019 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 ath11k: Use sizeof_field() instead of FIELD_SIZEOF()

The FIELD_SIZEOF() macro was redundant, and is being removed from the kernel. Since commit c593642c8be0 ("treewide: Use sizeof_field() macro") this is one of the last users of the old macro, so replace it.

---
resend: https://lore.kernel.org/lkml/[email protected]

---
 drivers/net/wireless/ath/ath11k/wmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/wmi.h +1 -1
index 4a518d406bc5..fd7cb07a9940 100644
@@ -44,7 +44,7 @@ struct wmi_tlv {
 
 #define WMI_TLV_LEN	GENMASK(15, 0)
 #define WMI_TLV_TAG	GENMASK(31, 16)
-#define TLV_HDR_SIZE	FIELD_SIZEOF(struct wmi_tlv, header)
+#define TLV_HDR_SIZE	sizeof_field(struct wmi_tlv, header)
 
 #define WMI_CMD_HDR_CMD_ID      GENMASK(23, 0)
 #define WMI_MAX_MEM_REQS        32
Signature · 10 lines
2.17.1


-- 
Kees Cook

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw
Quoted 6 lines · Kees Cook

The FIELD_SIZEOF() macro was redundant, and is being removed from the kernel. Since commit c593642c8be0 ("treewide: Use sizeof_field() macro") this is one of the last users of the old macro, so replace it.

Patch applied to ath-next branch of ath.git, thanks.

ca0e477931c5 ath11k: Use sizeof_field() instead of FIELD_SIZEOF()

Signature · 8 lines
https://patchwork.kernel.org/patch/11302533/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#2 lore raw
In reply to Kees Cook
Quoted 6 lines · Kees Cook

The FIELD_SIZEOF() macro was redundant, and is being removed from the kernel. Since commit c593642c8be0 ("treewide: Use sizeof_field() macro") this is one of the last users of the old macro, so replace it.

Patch applied to ath-next branch of ath.git, thanks.

ca0e477931c5 ath11k: Use sizeof_field() instead of FIELD_SIZEOF()

Signature · 3 lines
https://patchwork.kernel.org/patch/11302533/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches