Commit 8fe7f99a authored by Kumar Amit Mehta's avatar Kumar Amit Mehta Committed by David S. Miller

bnx2x: fix assignment of signed expression to unsigned variable

fix for incorrect assignment of signed expression to unsigned variable.
Signed-off-by: default avatarKumar Amit Mehta <gmate.amit@gmail.com>
Acked-by: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b46922e
...@@ -2139,12 +2139,12 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap) ...@@ -2139,12 +2139,12 @@ static u8 bnx2x_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)
break; break;
default: default:
BNX2X_ERR("Non valid capability ID\n"); BNX2X_ERR("Non valid capability ID\n");
rval = -EINVAL; rval = 1;
break; break;
} }
} else { } else {
DP(BNX2X_MSG_DCB, "DCB disabled\n"); DP(BNX2X_MSG_DCB, "DCB disabled\n");
rval = -EINVAL; rval = 1;
} }
DP(BNX2X_MSG_DCB, "capid %d:%x\n", capid, *cap); DP(BNX2X_MSG_DCB, "capid %d:%x\n", capid, *cap);
...@@ -2170,12 +2170,12 @@ static int bnx2x_dcbnl_get_numtcs(struct net_device *netdev, int tcid, u8 *num) ...@@ -2170,12 +2170,12 @@ static int bnx2x_dcbnl_get_numtcs(struct net_device *netdev, int tcid, u8 *num)
break; break;
default: default:
BNX2X_ERR("Non valid TC-ID\n"); BNX2X_ERR("Non valid TC-ID\n");
rval = -EINVAL; rval = 1;
break; break;
} }
} else { } else {
DP(BNX2X_MSG_DCB, "DCB disabled\n"); DP(BNX2X_MSG_DCB, "DCB disabled\n");
rval = -EINVAL; rval = 1;
} }
return rval; return rval;
...@@ -2188,7 +2188,7 @@ static int bnx2x_dcbnl_set_numtcs(struct net_device *netdev, int tcid, u8 num) ...@@ -2188,7 +2188,7 @@ static int bnx2x_dcbnl_set_numtcs(struct net_device *netdev, int tcid, u8 num)
return -EINVAL; return -EINVAL;
} }
static u8 bnx2x_dcbnl_get_pfc_state(struct net_device *netdev) static u8 bnx2x_dcbnl_get_pfc_state(struct net_device *netdev)
{ {
struct bnx2x *bp = netdev_priv(netdev); struct bnx2x *bp = netdev_priv(netdev);
DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled); DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled);
...@@ -2390,12 +2390,12 @@ static u8 bnx2x_dcbnl_get_featcfg(struct net_device *netdev, int featid, ...@@ -2390,12 +2390,12 @@ static u8 bnx2x_dcbnl_get_featcfg(struct net_device *netdev, int featid,
break; break;
default: default:
BNX2X_ERR("Non valid featrue-ID\n"); BNX2X_ERR("Non valid featrue-ID\n");
rval = -EINVAL; rval = 1;
break; break;
} }
} else { } else {
DP(BNX2X_MSG_DCB, "DCB disabled\n"); DP(BNX2X_MSG_DCB, "DCB disabled\n");
rval = -EINVAL; rval = 1;
} }
return rval; return rval;
...@@ -2431,12 +2431,12 @@ static u8 bnx2x_dcbnl_set_featcfg(struct net_device *netdev, int featid, ...@@ -2431,12 +2431,12 @@ static u8 bnx2x_dcbnl_set_featcfg(struct net_device *netdev, int featid,
break; break;
default: default:
BNX2X_ERR("Non valid featrue-ID\n"); BNX2X_ERR("Non valid featrue-ID\n");
rval = -EINVAL; rval = 1;
break; break;
} }
} else { } else {
DP(BNX2X_MSG_DCB, "dcbnl call not valid\n"); DP(BNX2X_MSG_DCB, "dcbnl call not valid\n");
rval = -EINVAL; rval = 1;
} }
return rval; return rval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment