Commit fa867453 authored by James A Shackleford's avatar James A Shackleford Committed by Greg Kroah-Hartman

staging: rtl8712: remove inline _RND128() and use round_up()

Signed-off-by: default avatarJames A Shackleford <shack@linux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d913e54e
......@@ -184,11 +184,6 @@ static inline void flush_signals_thread(void)
flush_signals(current);
}
static inline u32 _RND128(u32 sz)
{
return ((sz >> 7) + ((sz & 127) ? 1 : 0)) << 7;
}
static inline u32 _RND256(u32 sz)
{
return ((sz >> 8) + ((sz & 255) ? 1 : 0)) << 8;
......
......@@ -1065,7 +1065,7 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb)
precvframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf*/
precvframe->u.hdr.len = 0;
tmp_len = pkt_len + drvinfo_sz + RXDESC_SIZE;
pkt_offset = (u16)_RND128(tmp_len);
pkt_offset = (u16)round_up(tmp_len, 128);
/* for first fragment packet, driver need allocate 1536 +
* drvinfo_sz + RXDESC_SIZE to defrag packet. */
if ((mf == 1) && (frag == 0))
......
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