* [PATCH] Btrfs: avoid build warning on 32-bit
@ 2015-01-13 14:09 Arnd Bergmann
2015-01-14 0:16 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2015-01-13 14:09 UTC (permalink / raw)
To: Chris Mason
Cc: Miao Xie, Josef Bacik, David Sterba, linux-btrfs, linux-kernel
A recent change introduced a type cast from a private 64-bit
value to a pointer, which works fine on 64-bit architectures,
but not on 32-bit ones, where it produces a harmless compiler
warning:
fs/btrfs/extent_io.c: In function 'btrfs_free_io_failure_record':
fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
This adds an intermediate cast to 'unsigned long', which tells
the compiler to ignore the type mismatch.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: f612496bca664 ("Btrfs: cleanup the read failure record after write
or when the inode is freeing")
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4ebabd237153..790dbae3343c 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2190,7 +2190,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end)
next = next_state(state);
- failrec = (struct io_failure_record *)state->private;
+ failrec = (struct io_failure_record *)(unsigned long)state->private;
free_extent_state(state);
kfree(failrec);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: avoid build warning on 32-bit
2015-01-13 14:09 [PATCH] Btrfs: avoid build warning on 32-bit Arnd Bergmann
@ 2015-01-14 0:16 ` David Sterba
2015-01-14 1:12 ` Chris Mason
0 siblings, 1 reply; 3+ messages in thread
From: David Sterba @ 2015-01-14 0:16 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Chris Mason, Miao Xie, Josef Bacik, David Sterba, linux-btrfs,
linux-kernel
On Tue, Jan 13, 2015 at 03:09:03PM +0100, Arnd Bergmann wrote:
> A recent change introduced a type cast from a private 64-bit
> value to a pointer, which works fine on 64-bit architectures,
> but not on 32-bit ones, where it produces a harmless compiler
> warning:
>
> fs/btrfs/extent_io.c: In function 'btrfs_free_io_failure_record':
> fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>
> This adds an intermediate cast to 'unsigned long', which tells
> the compiler to ignore the type mismatch.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: f612496bca664 ("Btrfs: cleanup the read failure record after write
> or when the inode is freeing")
Already reported, but not merged
https://patchwork.kernel.org/patch/5541281/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: avoid build warning on 32-bit
2015-01-14 0:16 ` David Sterba
@ 2015-01-14 1:12 ` Chris Mason
0 siblings, 0 replies; 3+ messages in thread
From: Chris Mason @ 2015-01-14 1:12 UTC (permalink / raw)
To: dsterba
Cc: Arnd Bergmann, Miao Xie, Josef Bacik, David Sterba, linux-btrfs,
linux-kernel
On Tue, Jan 13, 2015 at 7:16 PM, David Sterba <dsterba@suse.cz> wrote:
> On Tue, Jan 13, 2015 at 03:09:03PM +0100, Arnd Bergmann wrote:
>> A recent change introduced a type cast from a private 64-bit
>> value to a pointer, which works fine on 64-bit architectures,
>> but not on 32-bit ones, where it produces a harmless compiler
>> warning:
>>
>> fs/btrfs/extent_io.c: In function 'btrfs_free_io_failure_record':
>> fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer
>> of different size [-Wint-to-pointer-cast]
>>
>> This adds an intermediate cast to 'unsigned long', which tells
>> the compiler to ignore the type mismatch.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: f612496bca664 ("Btrfs: cleanup the read failure record after
>> write
>> or when the inode is freeing")
>
> Already reported, but not merged
I'll take the original cast one for now and we can do the larger
cleanup for the next merge window.
-chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-14 1:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13 14:09 [PATCH] Btrfs: avoid build warning on 32-bit Arnd Bergmann
2015-01-14 0:16 ` David Sterba
2015-01-14 1:12 ` Chris Mason
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.