Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1261618
| From | Jens Axboe <axboe@fb.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] lightnvm: work around 32-bit built error |
| Date | 2015-11-03 16:30 +0100 |
| Message-ID | <qqLH6-4sG-65@gated-at.bofh.it> (permalink) |
| References | <qqKhY-3qa-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 11/03/2015 06:53 AM, Arnd Bergmann wrote: > The newly added lightnvm incorrectly uses a sector_t variable to > represent a data structure with fixed length bit fields, which breaks > when sector_t is configured to be 32-bit: > > In file included from ../drivers/lightnvm/core.c:29:0: > /include/linux/lightnvm.h:143:4: error: width of 'resved' exceeds its type > sector_t resved : 36; > include/linux/lightnvm.h: In function 'ppa_set_empty': > /include/linux/lightnvm.h:120:20: warning: large integer implicitly truncated to unsigned type [-Woverflow] > #define ADDR_EMPTY (~0ULL) Thanks Arnd, Matias sent another variant yesterday that changes this to u64 as well. > This patch resolves the build error, but does not address the fact that > bit fields are not reliable in data structures that are interpreted > by firmware on another architecture. If the layout is meant to be > stable, the bit fields should be replaced with explicit calculations. Matias? Are these every stored and read back, potentially on a different machine? -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] lightnvm: work around 32-bit built error Arnd Bergmann <arnd@arndb.de> - 2015-11-03 15:00 +0100
Re: [PATCH] lightnvm: work around 32-bit built error Jens Axboe <axboe@fb.com> - 2015-11-03 16:30 +0100
Re: [PATCH] lightnvm: work around 32-bit built error Matias Bjørling <mb@lightnvm.io> - 2015-11-03 17:50 +0100
csiph-web