]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: use correct div_s64 helper
authorArnd Bergmann <arnd@arndb.de>
Fri, 4 Mar 2016 23:49:31 +0000 (00:49 +0100)
committerJens Axboe <axboe@fb.com>
Sat, 5 Mar 2016 00:20:12 +0000 (17:20 -0700)
commit11f6b4df09f363f9cba47abdf7a5c07c8cb50bff
tree8a8aba90d8c816a7de6d9f88b6cde63e979de2f3
parent0cf52d1a800108fc9330df551ac637029286743f
nbd: use correct div_s64 helper

The do_div() macro now checks its arguments for the correct type,
and refuses anything other than u64, so we get a warning about
nbd_ioctl passing in an loff_t:

drivers/block/nbd.c: In function '__nbd_ioctl':
drivers/block/nbd.c:757:77: error: comparison of distinct pointer types lacks a cast [-Werror]

This changes the nbd code to use div_s64() instead, which takes
a signed argument.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 70b4fab27469 ("nbd: Create size change events for userspace")
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nbd.c