Skip to content

Commit d869dea

Browse files
Paolo Abenidavem330
authored andcommitted
flow_dissector: do not rely on implicit casts
This change fixes a couple of type mismatch reported by the sparse tool, explicitly using the requested type for the offending arguments. Signed-off-by: Paolo Abeni <[email protected]> Acked-by: Jon Maloy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 72a338b commit d869dea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/net/tipc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ struct tipc_basic_hdr {
4444
__be32 w[4];
4545
};
4646

47-
static inline u32 tipc_hdr_rps_key(struct tipc_basic_hdr *hdr)
47+
static inline __be32 tipc_hdr_rps_key(struct tipc_basic_hdr *hdr)
4848
{
4949
u32 w0 = ntohl(hdr->w[0]);
5050
bool keepalive_msg = (w0 & KEEPALIVE_MSG_MASK) == KEEPALIVE_MSG_MASK;
51-
int key;
51+
__be32 key;
5252

5353
/* Return source node identity as key */
5454
if (likely(!keepalive_msg))

net/core/flow_dissector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ u32 skb_get_poff(const struct sk_buff *skb)
13161316
{
13171317
struct flow_keys_basic keys;
13181318

1319-
if (!skb_flow_dissect_flow_keys_basic(skb, &keys, 0, 0, 0, 0, 0))
1319+
if (!skb_flow_dissect_flow_keys_basic(skb, &keys, NULL, 0, 0, 0, 0))
13201320
return 0;
13211321

13221322
return __skb_get_poff(skb, skb->data, &keys, skb_headlen(skb));

0 commit comments

Comments
 (0)