From: Ross Schmidt <ross.schm.dev@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Ross Schmidt <ross.schm.dev@gmail.com>
Subject: [PATCH 2/8] staging: rtl8723bs: replace _RND4 with round_up()
Date: Sat, 3 Oct 2020 20:17:37 -0500 [thread overview]
Message-ID: <20201004011743.10750-2-ross.schm.dev@gmail.com> (raw)
In-Reply-To: <20201004011743.10750-1-ross.schm.dev@gmail.com>
Use round_up instead of inline _RND4.
Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 +-
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 @@ int rtw_cmd_thread(void *context)
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)
{
--
2.26.2
next prev parent reply other threads:[~2020-10-04 1:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 1:17 [PATCH 1/8] staging: rtl8723bs: replace RND4 with round_up() Ross Schmidt
2020-10-04 1:17 ` Ross Schmidt [this message]
2020-10-04 1:17 ` [PATCH 3/8] staging: rtl8723bs: replace _RND8 " Ross Schmidt
2020-10-04 1:17 ` [PATCH 4/8] staging: rtl8723bs: remove unused macros Ross Schmidt
2020-10-04 1:17 ` [PATCH 5/8] staging: rtl8723bs: replace RTW_GET_BE24 with get_unaligned_be24 Ross Schmidt
2020-10-04 1:17 ` [PATCH 6/8] staging: rtl8723bs: replace RTW_GET_LE16 with get_unaligned_le16 Ross Schmidt
2020-10-04 1:17 ` [PATCH 7/8] staging: rtl8723bs: replace RTW_GET_BE16 with get_unaligned_be16 Ross Schmidt
2020-10-04 1:17 ` [PATCH 8/8] staging: rtl8723bs: replace _cancel_timer with del_timer_sync Ross Schmidt
2020-10-04 10:01 ` [PATCH 1/8] staging: rtl8723bs: replace RND4 with round_up() David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201004011743.10750-2-ross.schm.dev@gmail.com \
--to=ross.schm.dev@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox