diff options
author | Ariel Elior <ariele@broadcom.com> | 2013-01-09 07:04:35 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-10 22:14:16 (GMT) |
commit | 238268503f306cdc435eff2181e38c08ce412ed5 (patch) | |
tree | e0a12d902d86df87f25e142a036f4269d5e5343d | |
parent | 2efd32ee1b60b0b31404ca47c1ce70e5a5d24ebc (diff) | |
download | linux-fsl-qoriq-238268503f306cdc435eff2181e38c08ce412ed5.tar.xz |
bnx2x: align define usage to satisfy static checkers
Static checkers complained that the E1H_FUNC_MAX define is used
incorrectly in bnx2x_pretend_func(). The complaint was justified,
although its not a real bug, as the first part of the conditional
protects us in this case (a real bug would happen if a VF tried to
use the pretend func, but there are no VFs in E1H chips).
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index c6a2089..a296758 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -13360,7 +13360,7 @@ int bnx2x_pretend_func(struct bnx2x *bp, u16 pretend_func_val) { u32 pretend_reg; - if (CHIP_IS_E1H(bp) && pretend_func_val > E1H_FUNC_MAX) + if (CHIP_IS_E1H(bp) && pretend_func_val >= E1H_FUNC_MAX) return -1; /* get my own pretend register */ |