Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944226AbcJSPNM (ORCPT ); Wed, 19 Oct 2016 11:13:12 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33545 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S944320AbcJSPGb (ORCPT ); Wed, 19 Oct 2016 11:06:31 -0400 From: Ivan Safonov To: Greg Kroah-Hartman , Bhaktipriya Shridhar , Andy Shevchenko , Geliang Tang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: insafonov@gmail.com Subject: [PATCH 27/37] staging:r8188eu: remove recvframe_put function Date: Wed, 19 Oct 2016 22:07:55 +0700 Message-Id: <1476889685-7367-27-git-send-email-insafonov@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1476889685-7367-1-git-send-email-insafonov@gmail.com> References: <1476889685-7367-1-git-send-email-insafonov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2341 Lines: 65 skb_put used instead. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 17 ----------------- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 1d29808..3f7812f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -1380,7 +1380,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter, /* memcpy */ memcpy(pfhdr->pkt->tail, pnfhdr->pkt->data, pnfhdr->pkt->len); - recvframe_put(prframe, pnfhdr->pkt->len); + skb_put(prframe->pkt, pnfhdr->pkt->len); pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len; plist = plist->next; diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index f0ce2e6..5357a8d 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -253,23 +253,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); void rtw_reordering_ctrl_timeout_handler(unsigned long data); -static inline u8 *recvframe_put(struct recv_frame *precvframe, uint sz) -{ - /* used for append sz bytes from ptr to rx_tail, update rx_tail - * and return the updated rx_tail to the caller */ - /* after putting, rx_tail must be still larger than rx_end. */ - - u8 *tail; - - if (precvframe == NULL) - return NULL; - - tail = skb_put(precvframe->pkt, sz); - if (!tail) - return NULL; - return tail; -} - static inline void recvframe_pull_tail(struct recv_frame *precvframe, uint sz) { /* rmv data from rx_tail (by yitsen) */ diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 572a89f..2f29968 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -132,7 +132,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) goto _exit_recvbuf2recvframe; } - recvframe_put(precvframe, skb_len); + skb_put(precvframe->pkt, skb_len); switch (haldata->UsbRxAggMode) { case USB_RX_AGG_DMA: -- 2.7.3