mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 03:11:59 +00:00
net: dcb: getnumtcs()/setnumtcs() should return an int
{g|s}etnumtcs() today returns a u8 that is only used by the DCB code to verify no error occurred. Today the driver implementations return negative error codes which end up being non-zero so the logic works out but triggers some sparse warnings. To fix the sparse warnings convert the return value to an int. CC: Eilon Greenstein <eilong@broadcom.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
89d27a3c0a
commit
2b88f2de30
3 changed files with 6 additions and 6 deletions
|
@ -490,7 +490,7 @@ static u8 ixgbe_dcbnl_getcap(struct net_device *netdev, int capid, u8 *cap)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static u8 ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
|
||||
static int ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
u8 rval = 0;
|
||||
|
@ -514,7 +514,7 @@ static u8 ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
|
|||
return rval;
|
||||
}
|
||||
|
||||
static u8 ixgbe_dcbnl_setnumtcs(struct net_device *netdev, int tcid, u8 num)
|
||||
static int ixgbe_dcbnl_setnumtcs(struct net_device *netdev, int tcid, u8 num)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue