linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH v2] net: hsr: fix incorrect type usage for protocol variable
@ 2020-05-06 21:31 Murali Karicheri
  2020-05-07 12:14 ` Murali Karicheri
  0 siblings, 1 reply; 2+ messages in thread
From: Murali Karicheri @ 2020-05-06 21:31 UTC (permalink / raw)
  To: davem, kuba, netdev, linux-kernel

Fix following sparse checker warning:-

net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different base types)
net/hsr/hsr_slave.c:38:18:    expected unsigned short [unsigned] [usertype] protocol
net/hsr/hsr_slave.c:38:18:    got restricted __be16 [usertype] h_proto
net/hsr/hsr_slave.c:39:25: warning: restricted __be16 degrades to integer
net/hsr/hsr_slave.c:39:57: warning: restricted __be16 degrades to integer

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
 v2 : Added Acked-by from Vinicius Costa Gomes
 net/hsr/hsr_slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index f4b9f7a3ce51..25b6ffba26cd 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -18,7 +18,7 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
 {
 	struct sk_buff *skb = *pskb;
 	struct hsr_port *port;
-	u16 protocol;
+	__be16 protocol;
 
 	if (!skb_mac_header_was_set(skb)) {
 		WARN_ONCE(1, "%s: skb invalid", __func__);
-- 
2.17.1


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

* Re: [net PATCH v2] net: hsr: fix incorrect type usage for protocol variable
  2020-05-06 21:31 [net PATCH v2] net: hsr: fix incorrect type usage for protocol variable Murali Karicheri
@ 2020-05-07 12:14 ` Murali Karicheri
  0 siblings, 0 replies; 2+ messages in thread
From: Murali Karicheri @ 2020-05-07 12:14 UTC (permalink / raw)
  To: davem, kuba, netdev, linux-kernel

Hi David,

On 5/6/20 5:31 PM, Murali Karicheri wrote:
> Fix following sparse checker warning:-
> 
> net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different base types)
> net/hsr/hsr_slave.c:38:18:    expected unsigned short [unsigned] [usertype] protocol
> net/hsr/hsr_slave.c:38:18:    got restricted __be16 [usertype] h_proto
> net/hsr/hsr_slave.c:39:25: warning: restricted __be16 degrades to integer
> net/hsr/hsr_slave.c:39:57: warning: restricted __be16 degrades to integer
> 
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
>   v2 : Added Acked-by from Vinicius Costa Gomes
>   net/hsr/hsr_slave.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
> index f4b9f7a3ce51..25b6ffba26cd 100644
> --- a/net/hsr/hsr_slave.c
> +++ b/net/hsr/hsr_slave.c
> @@ -18,7 +18,7 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
>   {
>   	struct sk_buff *skb = *pskb;
>   	struct hsr_port *port;
> -	u16 protocol;
> +	__be16 protocol;
>   
>   	if (!skb_mac_header_was_set(skb)) {
>   		WARN_ONCE(1, "%s: skb invalid", __func__);
> 
I saw that you have applied the initial patch to net-next. Please ignore 
this.

-- 
Murali Karicheri
Texas Instruments

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

end of thread, other threads:[~2020-05-07 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 21:31 [net PATCH v2] net: hsr: fix incorrect type usage for protocol variable Murali Karicheri
2020-05-07 12:14 ` Murali Karicheri

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).