Commit 79f5d88f authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: use round_up() instead of _RND4()

Use in-kernel round_up() instead of custom _RND4().
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220407125742.7814-3-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 727841e0
......@@ -264,7 +264,7 @@ int rtw_cmd_thread(void *context)
goto post_process;
}
pcmd->cmdsz = _RND4((pcmd->cmdsz));/* _RND4 */
pcmd->cmdsz = round_up(pcmd->cmdsz, 4);
memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
......
......@@ -96,14 +96,6 @@ static inline void flush_signals_thread(void)
#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)
{
u32 val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment