Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944075AbcJSPF2 (ORCPT ); Wed, 19 Oct 2016 11:05:28 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:33852 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943815AbcJSPFY (ORCPT ); Wed, 19 Oct 2016 11:05:24 -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 01/37] staging:r8188eu: remove get_rxmem function Date: Wed, 19 Oct 2016 22:07:29 +0700 Message-Id: <1476889685-7367-1-git-send-email-insafonov@gmail.com> X-Mailer: git-send-email 2.7.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1649 Lines: 42 This simple one-line function used only once, and precvframe always not NULL. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 3e6edb6..691623c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -1343,7 +1343,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe) eth_type = 0x8712; /* append rx status for mp test packets */ ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2)-24); - memcpy(ptr, get_rxmem(precvframe), 24); + memcpy(ptr, precvframe->rx_head, 24); ptr += 24; } else { ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr) + (bsnaphdr ? 2 : 0))); diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index 052af7b..4280fa1 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -258,14 +258,6 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); void rtw_reordering_ctrl_timeout_handler(unsigned long data); -static inline u8 *get_rxmem(struct recv_frame *precvframe) -{ - /* always return rx_head... */ - if (precvframe == NULL) - return NULL; - return precvframe->rx_head; -} - static inline u8 *recvframe_pull(struct recv_frame *precvframe, int sz) { /* rx_data += sz; move rx_data sz bytes hereafter */ -- 2.7.3