linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	kbuild-all@01.org, Christopher Li <sparse@chrisli.org>,
	Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: [wireless-next:master 70/102] drivers/net/wireless/b43/phy_ht.c:338:35: sparse: cast truncates bits from constant value (ffff3fff becomes 3fff)
Date: Tue, 16 Sep 2014 10:17:18 +0800	[thread overview]
Message-ID: <20140916021718.GB16455@localhost> (raw)
In-Reply-To: <CACna6ryGg4NY2ecDjCKckXk8QXSJWVpbWWtdya9JRB618G92wQ@mail.gmail.com>

I could disable this warning in my reports, but CC sparse authors
first to check if there are more elegant solutions.

On Mon, Sep 15, 2014 at 11:16:09PM +0200, Rafał Miłecki wrote:
> On 15 September 2014 21:50, kbuild test robot <fengguang.wu@intel.com> wrote:
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
> > head:   1030f9fe65602465a89beaa05c3343cf9fd68a88
> > commit: 1f21de53ac8651b1a3e79576f1adf00aabecd052 [70/102] b43: HT-PHY: Implement band switching
> > reproduce:
> >   # apt-get install sparse
> >   git checkout 1f21de53ac8651b1a3e79576f1adf00aabecd052
> >   make ARCH=x86_64 allmodconfig
> >   make C=1 CF=-D__CHECK_ENDIAN__
> >
> >
> > sparse warnings: (new ones prefixed by >>)
> >
> >>> drivers/net/wireless/b43/phy_ht.c:338:35: sparse: cast truncates bits from constant value (ffff3fff becomes 3fff)
> >
> > vim +338 drivers/net/wireless/b43/phy_ht.c
> 
> I already got the same sparse warning twice (for different parts of code):
> 
> Message-ID: <53b5ab1e.Y9bKd3t4DteE6Pzc%fengguang.wu@intel.com>
> [wireless-next:master 163/164]
> drivers/net/wireless/b43/phy_n.c:5671:55: sparse: cast truncates bits
> from constant value (ffff7fff becomes 7fff)
> 
> Message-ID: <53c97150.9C2t3ebOTkndUZD5%fengguang.wu@intel.com>
> [wireless-next:master 70/75] drivers/net/wireless/b43/phy_n.c:6077:35:
> sparse: cast truncates bits from constant value (ffff3fff becomes
> 3fff)
> 
> In both of them I pointed that this is an expected behavior. No other
> solution was proposed.
> 
> Can this test be fixed or disabled?
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2014-09-16  2:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <541742fe.FxHiltLcSOUDGDDj%fengguang.wu@intel.com>
     [not found] ` <CACna6ryGg4NY2ecDjCKckXk8QXSJWVpbWWtdya9JRB618G92wQ@mail.gmail.com>
2014-09-16  2:17   ` Fengguang Wu [this message]
2014-09-16  7:20     ` [wireless-next:master 70/102] drivers/net/wireless/b43/phy_ht.c:338:35: sparse: cast truncates bits from constant value (ffff3fff becomes 3fff) Dan Carpenter

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=20140916021718.GB16455@localhost \
    --to=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sparse@chrisli.org \
    --cc=zajec5@gmail.com \
    /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).