Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1697116
| From | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Sparse warnings on GENMASK + arm32 |
| Date | 2017-07-26 15:50 +0200 |
| Message-ID | <u7uRl-Xi-29@gated-at.bofh.it> (permalink) |
| References | <u7jsR-29R-7@gated-at.bofh.it> <u7uHE-SQ-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 26, 2017 at 09:33:01AM -0400, Lance Richardson wrote: > > From: "Stephen Boyd" <sboyd@codeaurora.org> > > I see sparse warning when I check a clk driver file in the kernel > > on a 32-bit ARM build. > > > > drivers/clk/sunxi/clk-sun6i-ar100.c:65:20: warning: cast truncates bits from > > constant value (3ffffffff becomes ffffffff) > > Hmm, it seems sparse is incorrectly taking ~0UL to be a 64-bit value > while BITS_PER_LONG is (correctly) evaluated to be 32. > > #define GENMASK(h, l) \ > (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) It's the kernel CHECKFLAGS that should be using -m32/-m64 if built on a machine with a different wordsize tht the arch. I sent earlier a patch for ARM, I just forgot to CC the mailing list here. -- Luc
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Sparse warnings on GENMASK + arm32 Stephen Boyd <sboyd@codeaurora.org> - 2017-07-26 03:40 +0200
Re: Sparse warnings on GENMASK + arm32 Lance Richardson <lrichard@redhat.com> - 2017-07-26 15:40 +0200
Re: Sparse warnings on GENMASK + arm32 Christopher Li <sparse@chrisli.org> - 2017-07-26 15:50 +0200
Re: Sparse warnings on GENMASK + arm32 Luc Van Oostenryck <luc.vanoostenryck@gmail.com> - 2017-07-26 15:50 +0200
csiph-web