lkml.org 
[lkml]   [2014]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] fs/ext4/extents_status.c: fix 64-bit number truncation bug
From
On Mon, Mar 31, 2014 at 3:16 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
> '0x7FDEADBEEF' will be truncated to 32-bit number under unicore32. Need
> append 'ULL' for it.
>
> The related warning (with allmodconfig under unicore32):
>
> CC [M] fs/ext4/extents_status.o
> fs/ext4/extents_status.c: In function ‘__es_remove_extent’:
> fs/ext4/extents_status.c:813: warning: integer constant is too large for ‘long’ type

Thanks! This is failing on all 32-bit architectures.

> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

> ---
> fs/ext4/extents_status.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
> index 0a014a7..0ebc212 100644
> --- a/fs/ext4/extents_status.c
> +++ b/fs/ext4/extents_status.c
> @@ -810,7 +810,7 @@ retry:
>
> newes.es_lblk = end + 1;
> newes.es_len = len2;
> - block = 0x7FDEADBEEF;
> + block = 0x7FDEADBEEFULL;
> if (ext4_es_is_written(&orig_es) ||
> ext4_es_is_unwritten(&orig_es))
> block = ext4_es_pblock(&orig_es) +

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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/

\
 
 \ /
  Last update: 2014-04-06 16:21    [W:0.084 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site