linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Alex Elder <elder@linaro.org>
Cc: arnd@arndb.de, subashab@codeaurora.org, david.brown@linaro.org,
	agross@kernel.org, davem@davemloft.net,
	ilias.apalodimas@linaro.org, cpratapa@codeaurora.org,
	syadagir@codeaurora.org, evgreen@chromium.org,
	benchan@google.com, ejcaruso@google.com, netdev@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/8] net: qualcomm: rmnet: get rid of a variable in rmnet_map_ipv4_ul_csum_header()
Date: Mon, 20 May 2019 10:17:39 -0700	[thread overview]
Message-ID: <20190520171739.GU2085@tuxbook-pro> (raw)
In-Reply-To: <20190520135354.18628-7-elder@linaro.org>

On Mon 20 May 06:53 PDT 2019, Alex Elder wrote:

> 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@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.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
> 

  reply	other threads:[~2019-05-20 17:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 13:53 [PATCH 0/8] net: introduce "include/linux/if_rmnet.h" Alex Elder
2019-05-20 13:53 ` [PATCH 1/8] net: qualcomm: rmnet: fix struct rmnet_map_header Alex Elder
2019-05-20 15:38   ` Bjorn Andersson
2019-05-20 20:11   ` Subash Abhinov Kasiviswanathan
2019-05-20 21:23     ` Alex Elder
2019-05-21  1:32       ` Subash Abhinov Kasiviswanathan
2019-05-21  2:30         ` Alex Elder
2019-05-21  3:07           ` Bjorn Andersson
2019-05-21 11:03             ` Alex Elder
2019-05-20 13:53 ` [PATCH 2/8] net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros Alex Elder
2019-05-20 15:41   ` Bjorn Andersson
2019-05-20 13:53 ` [PATCH 3/8] net: qualcomm: rmnet: use field masks instead of C bit-fields Alex Elder
2019-05-20 15:43   ` Bjorn Andersson
2019-05-20 13:53 ` [PATCH 4/8] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header Alex Elder
2019-05-20 15:49   ` Bjorn Andersson
2019-05-20 13:53 ` [PATCH 5/8] net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer Alex Elder
2019-05-20 17:17   ` Bjorn Andersson
2019-05-20 13:53 ` [PATCH 6/8] net: qualcomm: rmnet: get rid of a variable in rmnet_map_ipv4_ul_csum_header() Alex Elder
2019-05-20 17:17   ` Bjorn Andersson [this message]
2019-05-20 13:53 ` [PATCH 7/8] net: qualcomm: rmnet: mark endianness of struct rmnet_map_dl_csum_trailer fields Alex Elder
2019-05-20 17:17   ` Bjorn Andersson
2019-05-20 13:53 ` [PATCH 8/8] net: introduce "include/linux/if_rmnet.h" Alex Elder
2019-05-20 17:18   ` Bjorn Andersson
2019-05-20 18:00 ` [PATCH 0/8] " Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190520171739.GU2085@tuxbook-pro \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=arnd@arndb.de \
    --cc=benchan@google.com \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=david.brown@linaro.org \
    --cc=ejcaruso@google.com \
    --cc=elder@linaro.org \
    --cc=evgreen@chromium.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=subashab@codeaurora.org \
    --cc=syadagir@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).