]> git.baikalelectronics.ru Git - kernel.git/commit
net: dcb: getnumtcs()/setnumtcs() should return an int
authorJohn Fastabend <john.r.fastabend@intel.com>
Fri, 10 Feb 2012 03:19:41 +0000 (03:19 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 3 Mar 2012 02:16:49 +0000 (18:16 -0800)
commitf5eda25c4792826590c722ac6ae3bc4e17dbdb9a
treecd267474e31962d04cedb175c4bf897031891dc8
parent93d3cafbd29487a7db120ae2049a5b989980a908
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>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
include/net/dcbnl.h