From: axboe@fb.com (Jens Axboe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] lightnvm: work around 32-bit built error
Date: Tue, 3 Nov 2015 08:25:36 -0700 [thread overview]
Message-ID: <5638D1F0.7060406@fb.com> (raw)
In-Reply-To: <4925999.tpkPGVQaeU@wuerfel>
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
next prev parent reply other threads:[~2015-11-03 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 13:53 [PATCH] lightnvm: work around 32-bit built error Arnd Bergmann
2015-11-03 15:25 ` Jens Axboe [this message]
2015-11-03 16:49 ` Matias Bjørling
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=5638D1F0.7060406@fb.com \
--to=axboe@fb.com \
--cc=linux-arm-kernel@lists.infradead.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).