diff options
author | Ross Schmidt <ross.schm.dev@gmail.com> | 2020-10-03 20:17:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-05 09:59:31 +0200 |
commit | 046bd5c9c2833fc6a0dd8bc200f6e2ab55af1755 (patch) | |
tree | b25bbc990e4e70736957c4b6b411966dd300aef8 | |
parent | 87fe08d74ca66d8d993bf28e23e70c2a80ba08ee (diff) | |
download | linux-046bd5c9c2833fc6a0dd8bc200f6e2ab55af1755.tar.bz2 |
staging: rtl8723bs: replace _RND4 with round_up()
Use round_up instead of inline _RND4.
Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201004011743.10750-2-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/include/osdep_service.h | 11 |
3 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index bd18d1803e27..047ec5167f86 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -469,7 +469,7 @@ _next: pcmdpriv->cmd_issued_cnt++; - pcmd->cmdsz = _RND4((pcmd->cmdsz));/* _RND4 */ + pcmd->cmdsz = round_up((pcmd->cmdsz), 4); memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz); diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 544d5a093229..465f51b99d39 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -474,7 +474,7 @@ static u32 sdio_write_port( return _FAIL; } - cnt = _RND4(cnt); + cnt = round_up(cnt, 4); HalSdioGetCmdAddr8723BSdio(adapter, addr, cnt >> 2, &addr); if (cnt > psdio->block_transfer_len) diff --git a/drivers/staging/rtl8723bs/include/osdep_service.h b/drivers/staging/rtl8723bs/include/osdep_service.h index ea3f4f3c86d2..8f0e5cbf485b 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service.h +++ b/drivers/staging/rtl8723bs/include/osdep_service.h @@ -132,17 +132,6 @@ static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *par #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r)) -static inline u32 _RND4(u32 sz) -{ - - u32 val; - - val = ((sz >> 2) + ((sz & 3) ? 1 : 0)) << 2; - - return val; - -} - static inline u32 _RND8(u32 sz) { |