* [PATCH 1/4] staging: rtl8712: remove inline _RND8() and use round_up()
@ 2014-06-23 0:27 James A Shackleford
2014-06-23 0:27 ` [PATCH 2/4] staging: rtl8712: remove inline _RND128() " James A Shackleford
0 siblings, 1 reply; 4+ messages in thread
From: James A Shackleford @ 2014-06-23 0:27 UTC (permalink / raw)
To: gregkh, Larry.Finger, devel, linux-kernel; +Cc: James A Shackleford
Signed-off-by: James A Shackleford <shack@linux.com>
---
drivers/staging/rtl8712/osdep_service.h | 5 -----
drivers/staging/rtl8712/rtl8712_cmd.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 09e1561..6af0df9 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 _RND8(u32 sz)
-{
- return ((sz >> 3) + ((sz & 7) ? 1 : 0)) << 3;
-}
-
static inline u32 _RND128(u32 sz)
{
return ((sz >> 7) + ((sz & 127) ? 1 : 0)) << 7;
diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index 8ca7d7e..4998fde 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -351,7 +351,7 @@ _next:
&padapter->dvobjpriv;
u8 blnPending = 0;
pcmdpriv->cmd_issued_cnt++;
- cmdsz = _RND8((pcmd->cmdsz)); /* _RND8 */
+ cmdsz = round_up(pcmd->cmdsz, 8);
wr_sz = TXDESC_SIZE + 8 + cmdsz;
pdesc->txdw0 |= cpu_to_le32((wr_sz-TXDESC_SIZE) &
0x0000ffff);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] staging: rtl8712: remove inline _RND128() and use round_up()
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
2014-06-23 0:27 ` [PATCH 3/4] staging: rtl8712: remove unused inline _RND256() James A Shackleford
0 siblings, 1 reply; 4+ messages in thread
From: James A Shackleford @ 2014-06-23 0:27 UTC (permalink / raw)
To: gregkh, Larry.Finger, devel, linux-kernel; +Cc: James A Shackleford
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] staging: rtl8712: remove unused inline _RND256()
2014-06-23 0:27 ` [PATCH 2/4] staging: rtl8712: remove inline _RND128() " James A Shackleford
@ 2014-06-23 0:27 ` James A Shackleford
2014-06-23 0:27 ` [PATCH 4/4] staging: rtl8712: remove unused inline _RND512() James A Shackleford
0 siblings, 1 reply; 4+ messages in thread
From: James A Shackleford @ 2014-06-23 0:27 UTC (permalink / raw)
To: gregkh, Larry.Finger, devel, linux-kernel; +Cc: James A Shackleford
Signed-off-by: James A Shackleford <shack@linux.com>
---
drivers/staging/rtl8712/osdep_service.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index 37ec56b..9316eab 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 _RND256(u32 sz)
-{
- return ((sz >> 8) + ((sz & 255) ? 1 : 0)) << 8;
-}
-
static inline u32 _RND512(u32 sz)
{
return ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] staging: rtl8712: remove unused inline _RND512()
2014-06-23 0:27 ` [PATCH 3/4] staging: rtl8712: remove unused inline _RND256() James A Shackleford
@ 2014-06-23 0:27 ` James A Shackleford
0 siblings, 0 replies; 4+ messages in thread
From: James A Shackleford @ 2014-06-23 0:27 UTC (permalink / raw)
To: gregkh, Larry.Finger, devel, linux-kernel; +Cc: James A Shackleford
Signed-off-by: James A Shackleford <shack@linux.com>
---
drivers/staging/rtl8712/osdep_service.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h
index 9316eab..425f0f1 100644
--- a/drivers/staging/rtl8712/osdep_service.h
+++ b/drivers/staging/rtl8712/osdep_service.h
@@ -184,10 +184,5 @@ static inline void flush_signals_thread(void)
flush_signals(current);
}
-static inline u32 _RND512(u32 sz)
-{
- return ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9;
-}
-
#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-23 0:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/4] staging: rtl8712: remove inline _RND128() " James A Shackleford
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
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.