Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755285AbcJGSPx (ORCPT ); Fri, 7 Oct 2016 14:15:53 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35719 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753824AbcJGSPp (ORCPT ); Fri, 7 Oct 2016 14:15:45 -0400 From: Ivan Safonov To: Greg Kroah-Hartman , Kyle Kuffermann , Alexey Khoroshilov , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Ivan Safonov Subject: [PATCH 26/34] staging:r8188eu: change type of the precv_buf member of recv_priv structure Date: Sat, 8 Oct 2016 01:01:25 +0700 Message-Id: <1475863293-27587-26-git-send-email-insafonov@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1475863293-27587-1-git-send-email-insafonov@gmail.com> References: <1475863293-27587-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: 3143 Lines: 78 To avoid unnecessary typecast. To use compiler type checking. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 6 +++--- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 2 +- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 1c7a9a0..d3d64fa 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -46,10 +46,10 @@ int rtw_hal_init_recv_priv(struct adapter *padapter) goto exit; } - precvpriv->precv_buf = precvpriv->pallocated_recv_buf; + precvpriv->precv_buf = (struct recv_buf *)precvpriv->pallocated_recv_buf; - precvbuf = (struct recv_buf *)precvpriv->precv_buf; + precvbuf = precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf); @@ -86,7 +86,7 @@ void rtw_hal_free_recv_priv(struct adapter *padapter) struct recv_buf *precvbuf; struct recv_priv *precvpriv = &padapter->recvpriv; - precvbuf = (struct recv_buf *)precvpriv->precv_buf; + precvbuf = precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { usb_free_urb(precvbuf->purb); diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 71d6ade..3675edb 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -987,7 +987,7 @@ u32 rtw_hal_inirp_init(struct adapter *Adapter) ("===> usb_inirp_init\n")); /* issue Rx irp to receive data */ - precvbuf = (struct recv_buf *)precvpriv->precv_buf; + precvbuf = precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { if (usb_read_port(Adapter, RECV_BULK_IN_ADDR, precvbuf) == false) { RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n")); diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index e871ebb..8fa3b81 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -181,7 +181,7 @@ struct recv_priv { struct sk_buff_head free_recv_skb_queue; struct sk_buff_head rx_skb_queue; u8 *pallocated_recv_buf; - u8 *precv_buf; /* 4 alignment */ + struct recv_buf *precv_buf; /* 4 alignment */ struct __queue free_recv_buf_queue; /* For display the phy informatiom */ u8 is_signal_dbg; /* for debug */ diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 175c1ae..b87663b 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -521,7 +521,7 @@ void rtw_hal_inirp_deinit(struct adapter *padapter) int i; struct recv_buf *precvbuf; - precvbuf = (struct recv_buf *)padapter->recvpriv.precv_buf; + precvbuf = padapter->recvpriv.precv_buf; DBG_88E("%s\n", __func__); -- 2.7.3