[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190520135354.18628-7-elder@linaro.org>
Date: Mon, 20 May 2019 08:53:52 -0500
From: Alex Elder <elder@...aro.org>
To: arnd@...db.de, subashab@...eaurora.org, david.brown@...aro.org,
agross@...nel.org, davem@...emloft.net
Cc: bjorn.andersson@...aro.org, ilias.apalodimas@...aro.org,
cpratapa@...eaurora.org, syadagir@...eaurora.org,
evgreen@...omium.org, benchan@...gle.com, ejcaruso@...gle.com,
netdev@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 6/8] net: qualcomm: rmnet: get rid of a variable in rmnet_map_ipv4_ul_csum_header()
The value passed as an argument to rmnet_map_ipv4_ul_csum_header()
is always an IPv4 header. Just have the type of the argument
reflect that rather than obscuring that with a void pointer. Rename
it to be consistent with rmnet_map_ipv6_ul_csum_header().
Signed-off-by: Alex Elder <elder@...aro.org>
---
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
index a95111cdcd29..61b7dbab2056 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
@@ -203,26 +203,25 @@ static void rmnet_map_complement_ipv4_txporthdr_csum_field(void *iphdr)
}
static void
-rmnet_map_ipv4_ul_csum_header(void *iphdr,
+rmnet_map_ipv4_ul_csum_header(struct iphdr *ip4hdr,
struct rmnet_map_ul_csum_header *ul_header,
struct sk_buff *skb)
{
- struct iphdr *ip4h = iphdr;
u16 offset;
u16 val;
- offset = skb_transport_header(skb) - (unsigned char *)iphdr;
+ offset = skb_transport_header(skb) - (unsigned char *)ip4hdr;
ul_header->csum_start_offset = htons(offset);
val = u16_encode_bits(skb->csum_offset, RMNET_MAP_UL_CSUM_INSERT_FMASK);
val |= RMNET_MAP_UL_CSUM_ENABLED_FMASK;
- if (ip4h->protocol == IPPROTO_UDP)
+ if (ip4hdr->protocol == IPPROTO_UDP)
val |= RMNET_MAP_UL_CSUM_UDP_FMASK;
ul_header->csum_info = htons(val);
skb->ip_summed = CHECKSUM_NONE;
- rmnet_map_complement_ipv4_txporthdr_csum_field(iphdr);
+ rmnet_map_complement_ipv4_txporthdr_csum_field(ip4hdr);
}
#if IS_ENABLED(CONFIG_IPV6)
--
2.20.1
Powered by blists - more mailing lists