* [PATCH] btmrvl_sdio: use DIV_ROUND_UP in suitable places
@ 2013-08-02 11:10 Andy Shevchenko
2013-08-15 7:56 ` Gustavo Padovan
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2013-08-02 11:10 UTC (permalink / raw)
To: linux-bluetooth, Marcel Holtmann, Gustavo Padovan; +Cc: Andy Shevchenko
There are two places where DIV_ROUND_UP may be used. It makes code a bit
clearer.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/bluetooth/btmrvl_sdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 75c2626..00da6df 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -486,7 +486,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)
if (firmwarelen - offset < txlen)
txlen = firmwarelen - offset;
- tx_blocks = (txlen + blksz_dl - 1) / blksz_dl;
+ tx_blocks = DIV_ROUND_UP(txlen, blksz_dl);
memcpy(fwbuf, &firmware[offset], txlen);
}
@@ -873,7 +873,7 @@ static int btmrvl_sdio_host_to_card(struct btmrvl_private *priv,
}
blksz = SDIO_BLOCK_SIZE;
- buf_block_len = (nb + blksz - 1) / blksz;
+ buf_block_len = DIV_ROUND_UP(nb, blksz);
sdio_claim_host(card->func);
--
1.8.4.rc0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btmrvl_sdio: use DIV_ROUND_UP in suitable places
2013-08-02 11:10 [PATCH] btmrvl_sdio: use DIV_ROUND_UP in suitable places Andy Shevchenko
@ 2013-08-15 7:56 ` Gustavo Padovan
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo Padovan @ 2013-08-15 7:56 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-bluetooth, Marcel Holtmann
Hi Andy,
* Andy Shevchenko <andriy.shevchenko@linux.intel.com> [2013-08-02 14:10:12 +0300]:
> There are two places where DIV_ROUND_UP may be used. It makes code a bit
> clearer.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/bluetooth/btmrvl_sdio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-15 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 11:10 [PATCH] btmrvl_sdio: use DIV_ROUND_UP in suitable places Andy Shevchenko
2013-08-15 7:56 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).