diff mbox series

ath11k: Use sizeof_field() instead of FIELD_SIZEOF()

Message ID 201912180919.2A471217@keescook (mailing list archive)
State New, archived
Headers show
Series ath11k: Use sizeof_field() instead of FIELD_SIZEOF() | expand

Commit Message

Kees Cook Dec. 18, 2019, 5:19 p.m. UTC
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.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/net/wireless/ath/ath11k/wmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Dec. 18, 2019, 6:07 p.m. UTC | #1
Kees Cook <keescook@chromium.org> writes:

> 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.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>

Please also Cc linux-wireless so that the patchwork sees this.
Kees Cook Dec. 19, 2019, 12:56 a.m. UTC | #2
On Wed, Dec 18, 2019 at 08:07:05PM +0200, Kalle Valo wrote:
> Kees Cook <keescook@chromium.org> writes:
> 
> > 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.
> >
> > Signed-off-by: Kees Cook <keescook@chromium.org>
> 
> Please also Cc linux-wireless so that the patchwork sees this.

Ah, okay. It wasn't listed in MAINTAINERS, so I didn't remember. Sorry;
I'll resend.
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 4a518d406bc5..fd7cb07a9940 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -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