netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] netfilter: nft_compat: fix sparse warning
Date: Thu, 12 Feb 2015 14:21:27 +0100	[thread overview]
Message-ID: <20150212132127.GA3301@salvia> (raw)
In-Reply-To: <CAOkSjBgk4=rjyEMPeqZWUJ4_49apz49XsTjtwE2VxrpnJvgipA@mail.gmail.com>

On Thu, Feb 12, 2015 at 01:25:57PM +0100, Arturo Borrero Gonzalez wrote:
> On 12 February 2015 at 13:20, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > On Thu, Feb 12, 2015 at 11:14:09AM +0100, Arturo Borrero Gonzalez wrote:
> >> >> net/netfilter/nft_compat.c:140:37: sparse: incorrect type in assignment (different base types)
> >>    net/netfilter/nft_compat.c:140:37:    expected restricted __be16 [usertype] ethproto
> >>    net/netfilter/nft_compat.c:140:37:    got unsigned char [unsigned] [usertype] proto
> >> >> net/netfilter/nft_compat.c:351:37: sparse: incorrect type in assignment (different base types)
> >>    net/netfilter/nft_compat.c:351:37:    expected restricted __be16 [usertype] ethproto
> >>    net/netfilter/nft_compat.c:351:37:    got unsigned char [unsigned] [usertype] proto
> >
> > This is spotting a more serious problem. The existing code is trimming
> > the ethernet protocol field to u8. We should use u16 all around the
> > code and then force the casting to calm down sparse.
> 
> I see,  I can handle it if you want.

Please, go ahead. Thanks.

      reply	other threads:[~2015-02-12 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 10:14 [PATCH] netfilter: nft_compat: fix sparse warning Arturo Borrero Gonzalez
2015-02-12 12:20 ` Pablo Neira Ayuso
2015-02-12 12:25   ` Arturo Borrero Gonzalez
2015-02-12 13:21     ` Pablo Neira Ayuso [this message]

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=20150212132127.GA3301@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).