Skip to content
Commit 262e827f authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures



The length calculation here is now invalid on 32-bit architectures,
since sk_buff::tail is a pointer and sk_buff::transport_header is
an integer offset:

drivers/net/ethernet/chelsio/cxgb3/sge.c: In function 'write_ofld_wr':
drivers/net/ethernet/chelsio/cxgb3/sge.c:1603:9: warning: passing argument 4 of 'make_sgl' makes integer from pointer without a cast [enabled by default]
         adap->pdev);
         ^
drivers/net/ethernet/chelsio/cxgb3/sge.c:964:28: note: expected 'unsigned int' but argument is of type 'sk_buff_data_t'
 static inline unsigned int make_sgl(const struct sk_buff *skb,
                            ^

Use the appropriate skb accessor functions.

Compile-tested only.

Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Fixes: 1a37e412 ('net: Use 16bits for *_headers fields of struct skbuff')
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 826cb7b4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment