[patch] Staging: bcm: mocro expansion bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The WIMAX_MAX_MTU macro is used in drivers/staging/bcm/CmHost.c like
this:

    if (Adapter->PackInfo[uiSearchRuleIndex].uiMaxBucketSize < WIMAX_MAX_MTU * 8)

The multiplication by eight has precedence over the addition so the
macro needs parenthesis to work.

Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

diff --git a/drivers/staging/bcm/Macros.h b/drivers/staging/bcm/Macros.h
index 6ee1480..0241234 100644
--- a/drivers/staging/bcm/Macros.h
+++ b/drivers/staging/bcm/Macros.h
@@ -231,7 +231,7 @@ typedef enum _E_PHS_DSC_ACTION
 
 #define MAX_PENDING_CTRL_PACKET (MAX_CTRL_QUEUE_LEN-10)
 
-#define WIMAX_MAX_MTU 					MTU_SIZE + ETH_HLEN
+#define WIMAX_MAX_MTU			(MTU_SIZE + ETH_HLEN)
 #define AUTO_LINKUP_ENABLE              0x2
 #define AUTO_SYNC_DISABLE              	0x1
 #define AUTO_FIRM_DOWNLOAD              0x1
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux