* [PATCH] NET: parentheses around definitions
@ 2007-11-29 14:39 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2007-11-29 14:39 UTC (permalink / raw)
To: amitkale, ram.vepa, santosh.rastapur, sivakumar.subramani,
sreenivasa.honnur
Cc: netdev
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 <12o3l@tiscali.nl>
---
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index cfb847b..b3c0a00 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -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))
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 6326667..379d70b 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -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) \
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-29 14:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 14:39 [PATCH] NET: parentheses around definitions Roel Kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).