summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-11-20 21:07:41 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-20 12:50:24 -0800
commitcfccde80e8b1d935e611d40c0f0bba3ed0557bd8 (patch)
tree67d5c75d873a76902b6c1d378b5a13d77f850c8f
parente20c43dbdf960e8a03381aa455ddea56504bdbc4 (diff)
downloadlinux-cfccde80e8b1d935e611d40c0f0bba3ed0557bd8.tar.bz2
r8169: use macro FIELD_SIZEOF in definition of FW_OPCODE_SIZE
Using macro FIELD_SIZEOF makes this define easier understandable. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/realtek/r8169_firmware.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_firmware.c b/drivers/net/ethernet/realtek/r8169_firmware.c
index 52241508473a..927bb46b32d7 100644
--- a/drivers/net/ethernet/realtek/r8169_firmware.c
+++ b/drivers/net/ethernet/realtek/r8169_firmware.c
@@ -37,7 +37,7 @@ struct fw_info {
u8 chksum;
} __packed;
-#define FW_OPCODE_SIZE sizeof(typeof(*((struct rtl_fw_phy_action *)0)->code))
+#define FW_OPCODE_SIZE FIELD_SIZEOF(struct rtl_fw_phy_action, code[0])
static bool rtl_fw_format_ok(struct rtl_fw *rtl_fw)
{