All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable
@ 2020-05-06 15:41 Murali Karicheri
  2020-05-06 17:33 ` Vinicius Costa Gomes
  2020-05-06 22:00 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Murali Karicheri @ 2020-05-06 15:41 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>
---
 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] 4+ messages in thread

* Re: [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable
  2020-05-06 15:41 [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable Murali Karicheri
@ 2020-05-06 17:33 ` Vinicius Costa Gomes
  2020-05-06 20:49   ` Murali Karicheri
  2020-05-06 22:00 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Vinicius Costa Gomes @ 2020-05-06 17:33 UTC (permalink / raw)
  To: Murali Karicheri, davem, kuba, netdev, linux-kernel

Hi Murali,

Murali Karicheri <m-karicheri2@ti.com> writes:

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

I think this patch should go via the net tree, as it is a warning fix.
Anyway...

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>


-- 
Vinicius

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

* Re: [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable
  2020-05-06 17:33 ` Vinicius Costa Gomes
@ 2020-05-06 20:49   ` Murali Karicheri
  0 siblings, 0 replies; 4+ messages in thread
From: Murali Karicheri @ 2020-05-06 20:49 UTC (permalink / raw)
  To: Vinicius Costa Gomes, davem, kuba, netdev, linux-kernel

Hi Vinicius,

On 5/6/20 1:33 PM, Vinicius Costa Gomes wrote:
> Hi Murali,
> 
> Murali Karicheri <m-karicheri2@ti.com> writes:
> 
>> 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>
>> ---
> 
> I think this patch should go via the net tree, as it is a warning fix.
> Anyway...
> 
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> 
> 
Thanks. I will re-send it with net prefix and you ack. I thought since
this is just a warning, it is not that serious to include in net tree.

-- 
Murali Karicheri
Texas Instruments

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

* Re: [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable
  2020-05-06 15:41 [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable Murali Karicheri
  2020-05-06 17:33 ` Vinicius Costa Gomes
@ 2020-05-06 22:00 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-05-06 22:00 UTC (permalink / raw)
  To: m-karicheri2; +Cc: kuba, netdev, linux-kernel

From: Murali Karicheri <m-karicheri2@ti.com>
Date: Wed, 6 May 2020 11:41:07 -0400

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

Applied.

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

end of thread, other threads:[~2020-05-06 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 15:41 [net-next PATCH] net: hsr: fix incorrect type usage for protocol variable Murali Karicheri
2020-05-06 17:33 ` Vinicius Costa Gomes
2020-05-06 20:49   ` Murali Karicheri
2020-05-06 22:00 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.