From: James A Shackleford <shack@linux.com>
To: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: James A Shackleford <shack@linux.com>
Subject: [PATCH 2/4] staging: rtl8712: remove inline _RND128() and use round_up()
Date: Sun, 22 Jun 2014 20:27:56 -0400 [thread overview]
Message-ID: <1403483278-7343-2-git-send-email-shack@linux.com> (raw)
In-Reply-To: <1403483278-7343-1-git-send-email-shack@linux.com>
Signed-off-by: James A Shackleford <shack@linux.com>
---
drivers/staging/rtl8712/osdep_service.h | 5 -----
drivers/staging/rtl8712/rtl8712_recv.c | 2 +-
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index 6af0df9..37ec56b 100644
--- a/drivers/staging/rtl8712/osdep_service.h
+++ b/drivers/staging/rtl8712/osdep_service.h
@@ -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;
diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
index 1f70017..fb947c1 100644
--- a/drivers/staging/rtl8712/rtl8712_recv.c
+++ b/drivers/staging/rtl8712/rtl8712_recv.c
@@ -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))
--
1.7.9.5
next prev parent reply other threads:[~2014-06-23 0:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 0:27 [PATCH 1/4] staging: rtl8712: remove inline _RND8() and use round_up() James A Shackleford
2014-06-23 0:27 ` James A Shackleford [this message]
2014-06-23 0:27 ` [PATCH 3/4] staging: rtl8712: remove unused inline _RND256() James A Shackleford
2014-06-23 0:27 ` [PATCH 4/4] staging: rtl8712: remove unused inline _RND512() James A Shackleford
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=1403483278-7343-2-git-send-email-shack@linux.com \
--to=shack@linux.com \
--cc=Larry.Finger@lwfinger.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.