From: Greg KH <gregkh@linuxfoundation.org>
To: Javier Rodriguez <jrodbar@yahoo.es>
Cc: janani.rvchndrn@gmail.com, bhumirks@gmail.com,
imre.deak@gmail.com, emil.gedda@emilgedda.se,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: gdm724x: fix sparse warnings in file gdm_lte.c
Date: Fri, 3 Feb 2017 10:54:03 +0100 [thread overview]
Message-ID: <20170203095403.GD24767@kroah.com> (raw)
In-Reply-To: <1485887839-1756-1-git-send-email-jrodbar@yahoo.es>
On Tue, Jan 31, 2017 at 07:37:19PM +0100, Javier Rodriguez wrote:
> drivers/staging/gdm724x/gdm_lte.c:201:33: warning: incorrect type in assignment (different base types)
> drivers/staging/gdm724x/gdm_lte.c:201:33: expected unsigned int [unsigned] [addressable] [usertype] ph_len
> drivers/staging/gdm724x/gdm_lte.c:201:33: got restricted __be16 [usertype] payload_len
> drivers/staging/gdm724x/gdm_lte.c:311:39: warning: incorrect type in assignment (different base types)
> drivers/staging/gdm724x/gdm_lte.c:311:39: expected restricted __sum16 [addressable] [assigned] [usertype] icmp6_cksum
> drivers/staging/gdm724x/gdm_lte.c:311:39: got int
>
> Signed-off-by: Javier Rodriguez <jrodbar@yahoo.es>
> ---
> drivers/staging/gdm724x/gdm_lte.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
> index a182757..86b2b4f 100644
> --- a/drivers/staging/gdm724x/gdm_lte.c
> +++ b/drivers/staging/gdm724x/gdm_lte.c
> @@ -198,7 +198,7 @@ static int icmp6_checksum(struct ipv6hdr *ipv6, u16 *ptr, int len)
> memset(&pseudo_header, 0, sizeof(pseudo_header));
> memcpy(&pseudo_header.ph.ph_src, &ipv6->saddr.in6_u.u6_addr8, 16);
> memcpy(&pseudo_header.ph.ph_dst, &ipv6->daddr.in6_u.u6_addr8, 16);
> - pseudo_header.ph.ph_len = ipv6->payload_len;
> + pseudo_header.ph.ph_len = be16_to_cpu(ipv6->payload_len);
> pseudo_header.ph.ph_nxt = ipv6->nexthdr;
>
> w = (u16 *)&pseudo_header;
> @@ -308,7 +308,7 @@ static int gdm_lte_emulate_ndp(struct sk_buff *skb_in, u32 nic_type)
> memcpy(icmp_na + sizeof(struct icmp6hdr), &na,
> sizeof(struct neighbour_advertisement));
>
> - icmp6_out.icmp6_cksum = icmp6_checksum(&ipv6_out,
> + icmp6_out.icmp6_cksum = (__force __sum16) icmp6_checksum(&ipv6_out,
That feels really wrong, are you sure this is correct?
thanks,
greg k-h
parent reply other threads:[~2017-02-03 9:54 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1485887839-1756-1-git-send-email-jrodbar@yahoo.es>]
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=20170203095403.GD24767@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bhumirks@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=emil.gedda@emilgedda.se \
--cc=imre.deak@gmail.com \
--cc=janani.rvchndrn@gmail.com \
--cc=jrodbar@yahoo.es \
--cc=linux-kernel@vger.kernel.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