summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-07-16 22:32:39 -0700
committerDavid S. Miller <davem@davemloft.net>2014-07-17 16:02:29 -0700
commitc2659479f7865fb538493089bce3dd3d2abf90b0 (patch)
treebe1dbef19fbeb971a8a6445536d80f1a163fe465 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
parent9cc63db5e1f2f1c387f1a4c9983cf1364fe4ef95 (diff)
Update setapp/getapp prototypes in dcbnl_rtnl_ops to return int instead of u8
v2: fixed issue with checking return of dcbnl_rtnl_ops->getapp() Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
index a8b1073e6373..0d3a9df5be36 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
@@ -648,26 +648,17 @@ static int __cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id,
}
/* Return the Application User Priority Map associated with the specified
- * Application ID. Since this routine is prototyped to return "u8" we can't
- * return errors ...
+ * Application ID.
*/
-static u8 cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id)
+static int cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id)
{
- int result = __cxgb4_getapp(dev, app_idtype, app_id, 0);
-
- if (result < 0)
- result = 0;
-
- return result;
+ return __cxgb4_getapp(dev, app_idtype, app_id, 0);
}
-/* Write a new Application User Priority Map for the specified Application ID.
- * This routine is prototyped to return "u8" but other instantiations of the
- * DCB NetLink Operations "setapp" routines return negative errnos for errors.
- * We follow their lead.
+/* Write a new Application User Priority Map for the specified Application ID
*/
-static u8 cxgb4_setapp(struct net_device *dev, u8 app_idtype, u16 app_id,
- u8 app_prio)
+static int cxgb4_setapp(struct net_device *dev, u8 app_idtype, u16 app_id,
+ u8 app_prio)
{
struct fw_port_cmd pcmd;
struct port_info *pi = netdev2pinfo(dev);