Skip to content

Commit e678bad

Browse files
finikorgGustavo Padovan
authored andcommitted
Bluetooth: btmrvl: Use DIV_ROUND_UP macro
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) Signed-off-by: Andrei Emeltchenko <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
1 parent 4263280 commit e678bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bluetooth/btmrvl_sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
514514
}
515515

516516
blksz = SDIO_BLOCK_SIZE;
517-
num_blocks = (buf_len + blksz - 1) / blksz;
517+
num_blocks = DIV_ROUND_UP(buf_len, blksz);
518518

519519
if (buf_len <= SDIO_HEADER_LEN
520520
|| (num_blocks * blksz) > ALLOC_BUF_SIZE) {

0 commit comments

Comments
 (0)