[PATCH 2/5] net/niu: Fix none-const BUILD_BUG_ON usage

From: Boaz Harrosh
Date: Mon Sep 01 2008 - 09:12:52 EST



It would be easy to constify the expression but I have removed
the BUILD_BUG_ON. (Left the useful comment though). Since
it has no point here, a BUILD_BUG_ON is used when two
inter-dependent but separate pieces of code must match. which
is not the case here.

Signed-off-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>
CC: David S. Miller <davem@xxxxxxxxxxxxx>
---
drivers/net/niu.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index e4765b7..b517d0c 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -5135,17 +5135,15 @@ static void niu_init_tx_mac(struct niu *np)
{
u64 min, max;

+ /* NOTE: XMAC_MIN register only accepts values for TX min which
+ * have the low 3 bits cleared.
+ */
min = 64;
if (np->dev->mtu > ETH_DATA_LEN)
max = 9216;
else
max = 1522;

- /* The XMAC_MIN register only accepts values for TX min which
- * have the low 3 bits cleared.
- */
- BUILD_BUG_ON(min & 0x7);
-
if (np->flags & NIU_FLAGS_XMAC)
niu_init_tx_xmac(np, min, max);
else
--
1.5.6.rc1.5.gadf6


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/