staging: rtl8723bs: replace _RND8 with round_up()
authorRoss Schmidt <ross.schm.dev@gmail.com>
Sun, 4 Oct 2020 01:17:38 +0000 (20:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Oct 2020 07:59:31 +0000 (09:59 +0200)
Use round_up instead of inline _RND8.

Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201004011743.10750-3-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
drivers/staging/rtl8723bs/include/osdep_service.h

index b9ccaad..1fbf89c 100644 (file)
@@ -369,7 +369,7 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t)
                                }
                        }
 
-                       pkt_offset = _RND8(pkt_offset);
+                       pkt_offset = round_up(pkt_offset, 8);
                        precvbuf->pdata += pkt_offset;
                        ptr = precvbuf->pdata;
                        precvframe = NULL;
index 8f0e5cb..c5e9a4e 100644 (file)
@@ -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 _RND8(u32 sz)
-{
-
-       u32 val;
-
-       val = ((sz >> 3) + ((sz & 7) ? 1 : 0)) << 3;
-
-       return val;
-
-}
-
 #ifndef MAC_FMT
 #define MAC_FMT "%pM"
 #endif