NET: parentheses around definitions
Subsystems (2)
PATCH 1/1 NET: parentheses around definitions
There are multiplictions wherein these defines are abused in:drivers/net/netxen/netxen_nic_ethtool.c:705 drivers/net/s2io.c:350
--
Add parentheses to prevent operator precedence errors
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/netxen/netxen_nic_ethtool.c +1 -1
@@ -86,7 +86,7 @@ static const char netxen_nic_gstrings_test[][ETH_GSTRING_LEN] = { "Link_Test_on_offline" }; -#define NETXEN_NIC_TEST_LEN sizeof(netxen_nic_gstrings_test) / ETH_GSTRING_LEN +#define NETXEN_NIC_TEST_LEN (sizeof(netxen_nic_gstrings_test) / ETH_GSTRING_LEN)#define NETXEN_NIC_REGS_COUNT 42#define NETXEN_NIC_REGS_LEN (NETXEN_NIC_REGS_COUNT * sizeof(__le32))
drivers/net/s2io.c +1 -1
@@ -346,7 +346,7 @@ static char ethtool_driver_stats_keys[][ETH_GSTRING_LEN] = {#define XFRAME_I_STAT_STRINGS_LEN ( XFRAME_I_STAT_LEN * ETH_GSTRING_LEN )#define XFRAME_II_STAT_STRINGS_LEN ( XFRAME_II_STAT_LEN * ETH_GSTRING_LEN ) -#define S2IO_TEST_LEN sizeof(s2io_gstrings) / ETH_GSTRING_LEN +#define S2IO_TEST_LEN (sizeof(s2io_gstrings) / ETH_GSTRING_LEN)#define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN#define S2IO_TIMER_CONF (timer, handle, arg, exp) \