[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20191015084731.8514-1-wambui.karugax@gmail.com>
Date: Tue, 15 Oct 2019 11:47:31 +0300
From: Wambui Karuga <wambui.karugax@...il.com>
To: outreachy-kernel@...glegroups.com
Cc: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] staging: octeon: fix restricted __be16 degrades to integer
Add cast to fix the following sparse warning:
warning: restricted __be16 degrades to integer
Signed-off-by: Wambui Karuga <wambui.karugax@...il.com>
---
drivers/staging/octeon/ethernet-tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 5114273826ec..b334cf89794e 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -598,7 +598,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
#endif
work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0) ||
(ip_hdr(skb)->frag_off ==
- 1 << 14));
+ cpu_to_be16(1 << 14)));
#if 0
/* Assume Linux is sending a good packet */
work->word2.s.IP_exc = 0;
--
2.23.0
Powered by blists - more mailing lists