diff options
author | John Garry <[email protected]> | 2024-06-21 18:30:16 +0000 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2024-06-21 12:31:55 -0600 |
commit | 8324bb755a80d463ff53379e5d64991656512069 (patch) | |
tree | e6b7f5cc61e9dcbfd9c064335bf71daf3fd80bd4 /lib/netdev-notifier-error-inject.c | |
parent | caaf7101c01a91a882d3da2f566579dda692367d (diff) |
block: Fix blk_validate_atomic_write_limits() build for arm32
For arm32, we get the following build warning:
In file included from /tmp/next/build/include/linux/printk.h:10,
from /tmp/next/build/include/linux/kernel.h:31,
from /tmp/next/build/block/blk-settings.c:5:
/tmp/next/build/block/blk-settings.c: In function 'blk_validate_atomic_write_limits':
/tmp/next/build/include/asm-generic/div64.h:222:35: warning: comparison of distinct pointer types lacks a cast
222 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
| ^~
The divident for do_div() should be 64b, which it is not. Since we want to
check 2x unsigned ints, just use % operator. This allows us to drop the
chunk_sectors variable.
Fixes: 9da3d1e912f3 ("block: Add core atomic write support")
Reported-by: Mark Brown <[email protected]>
Closes: https://lore.kernel.org/linux-next/[email protected]/T/#mbf067b1edd89c7f9d7dac6e258c516199953a108
Signed-off-by: John Garry <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions