netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] cxgb4: Fix endian bug introduced in cxgb4 dcb patchset
@ 2014-06-24  6:11 Anish Bhatt
  2014-06-24 19:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Anish Bhatt @ 2014-06-24  6:11 UTC (permalink / raw)
  To: netdev; +Cc: davem, leedom, hariprasad, Anish Bhatt

Hi,
 This patch fixes warnings generated by sparse as pointed out by kbuild test
 robot, please apply to net-next. Applies on top of 
commit 79631c89ed70643fd0579a65834b227795b251ee ("trivial: net/irda/irlmp.c:
Fix closing brace followed by if")
-Anish

v2: cleanup submission as per davem's feedback

Fixes: 76bcb31efc06 ("cxgb4 : Add DCBx support codebase  and dcbnl_ops")
Signed-off-by: Anish Bhatt <anish@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
index 39b4a85fceae..a8b1073e6373 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
@@ -488,12 +488,12 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
 		pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY);
 
 	pcmd.u.dcb.pfc.type = FW_PORT_DCB_TYPE_PFC;
-	pcmd.u.dcb.pfc.pfcen = cpu_to_be16(pi->dcb.pfcen);
+	pcmd.u.dcb.pfc.pfcen = pi->dcb.pfcen;
 
 	if (pfccfg)
-		pcmd.u.dcb.pfc.pfcen |= cpu_to_be16(1 << priority);
+		pcmd.u.dcb.pfc.pfcen |= (1 << priority);
 	else
-		pcmd.u.dcb.pfc.pfcen &= cpu_to_be16(~(1 << priority));
+		pcmd.u.dcb.pfc.pfcen &= (~(1 << priority));
 
 	err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd);
 	if (err != FW_PORT_DCB_CFG_SUCCESS) {
@@ -501,7 +501,7 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
 		return;
 	}
 
-	pi->dcb.pfcen = be16_to_cpu(pcmd.u.dcb.pfc.pfcen);
+	pi->dcb.pfcen = pcmd.u.dcb.pfc.pfcen;
 }
 
 static u8 cxgb4_setall(struct net_device *dev)
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net-next] cxgb4: Fix endian bug introduced in cxgb4 dcb patchset
  2014-06-24  6:11 [PATCH v2 net-next] cxgb4: Fix endian bug introduced in cxgb4 dcb patchset Anish Bhatt
@ 2014-06-24 19:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-24 19:55 UTC (permalink / raw)
  To: anish; +Cc: netdev, leedom, hariprasad

From: Anish Bhatt <anish@chelsio.com>
Date: Mon, 23 Jun 2014 23:11:09 -0700

> Hi,
>  This patch fixes warnings generated by sparse as pointed out by kbuild test
>  robot, please apply to net-next. Applies on top of 
> commit 79631c89ed70643fd0579a65834b227795b251ee ("trivial: net/irda/irlmp.c:
> Fix closing brace followed by if")
> -Anish
> 
> v2: cleanup submission as per davem's feedback
> 
> Fixes: 76bcb31efc06 ("cxgb4 : Add DCBx support codebase  and dcbnl_ops")
> Signed-off-by: Anish Bhatt <anish@chelsio.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-24 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-24  6:11 [PATCH v2 net-next] cxgb4: Fix endian bug introduced in cxgb4 dcb patchset Anish Bhatt
2014-06-24 19:55 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).