mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Safonov <insafonov@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kyle Kuffermann <kyle.kuffermann@gmail.com>,
	Alexey Khoroshilov <khoroshilov@ispras.ru>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Ivan Safonov <insafonov@gmail.com>
Subject: [PATCH 27/34] staging:r8188eu: remove pallocated_recv_buf member of the recv_priv structure
Date: Sat,  8 Oct 2016 01:01:26 +0700	[thread overview]
Message-ID: <1475863293-27587-27-git-send-email-insafonov@gmail.com> (raw)
In-Reply-To: <1475863293-27587-1-git-send-email-insafonov@gmail.com>

recv_priv used instead.
recv_priv does not changed after assigning
and it can be used as kfree argument

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
 drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 10 +++-------
 drivers/staging/rtl8188eu/include/rtw_recv.h   |  1 -
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
index d3d64fa..0fc093e 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
@@ -37,18 +37,14 @@ int	rtw_hal_init_recv_priv(struct adapter *padapter)
 	/* init recv_buf */
 	_rtw_init_queue(&precvpriv->free_recv_buf_queue);
 
-	precvpriv->pallocated_recv_buf =
+	precvpriv->precv_buf =
 		kcalloc(NR_RECVBUFF, sizeof(struct recv_buf), GFP_KERNEL);
-	if (!precvpriv->pallocated_recv_buf) {
+	if (!precvpriv->precv_buf) {
 		res = _FAIL;
 		RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
 				("alloc recv_buf fail!\n"));
 		goto exit;
 	}
-
-	precvpriv->precv_buf = (struct recv_buf *)precvpriv->pallocated_recv_buf;
-
-
 	precvbuf = precvpriv->precv_buf;
 
 	for (i = 0; i < NR_RECVBUFF; i++) {
@@ -93,7 +89,7 @@ void rtw_hal_free_recv_priv(struct adapter *padapter)
 		precvbuf++;
 	}
 
-	kfree(precvpriv->pallocated_recv_buf);
+	kfree(precvpriv->precv_buf);
 
 	if (skb_queue_len(&precvpriv->rx_skb_queue))
 		DBG_88E(KERN_WARNING "rx_skb_queue not empty\n");
diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h
index 8fa3b81..e95f4f2 100644
--- a/drivers/staging/rtl8188eu/include/rtw_recv.h
+++ b/drivers/staging/rtl8188eu/include/rtw_recv.h
@@ -180,7 +180,6 @@ struct recv_priv {
 	struct tasklet_struct recv_tasklet;
 	struct sk_buff_head free_recv_skb_queue;
 	struct sk_buff_head rx_skb_queue;
-	u8 *pallocated_recv_buf;
 	struct recv_buf *precv_buf;    /*  4 alignment */
 	struct __queue free_recv_buf_queue;
 	/* For display the phy informatiom */
-- 
2.7.3

  parent reply	other threads:[~2016-10-07 17:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 18:01 [PATCH 01/34] staging:r8188eu: remove rtw_os_recv_resource_alloc function Ivan Safonov
2016-10-07 18:01 ` [PATCH 02/34] staging:r8188eu: remove wrappers for rtw_hal_inirp_init function Ivan Safonov
2016-10-07 18:01 ` [PATCH 03/34] staging:r8188eu: remove pm_netdev_open function Ivan Safonov
2016-10-07 18:01 ` [PATCH 04/34] staging:r8188eu: remove free_recv_buf_queue_cnt member of recv_priv structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 05/34] staging:r8188eu: remove skb data alignment in r8188eu driver code Ivan Safonov
2016-10-07 18:01 ` [PATCH 06/34] staging:r8188eu: change usb_read_port last argument type to (struct *recv_buf) Ivan Safonov
2016-10-07 18:01 ` [PATCH 07/34] staging:r8188eu: remove (u32 cnt) argument of usb_read_port function Ivan Safonov
2016-10-07 18:01 ` [PATCH 08/34] staging:r8188eu: remove ff_hwaddr member of recv_priv structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 09/34] staging:r8188eu: remove wrappers for LedControl8188eu function Ivan Safonov
2016-10-07 18:01 ` [PATCH 10/34] staging:r8188eu: remove bRegUseLed member of led_priv structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 11/34] staging:r8188eu: remove bLedStartToLinkBlinkInProgress and bSWLedCtrl members of LED_871x structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 12/34] staging:r8188eu: remove bLedOpenDrain member of hal_data_8188e structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 13/34] staging:r8188eu: remove ExternalPA " Ivan Safonov
2016-10-07 18:01 ` [PATCH 14/34] staging:r8188eu: remove unused members " Ivan Safonov
2016-10-07 18:01 ` [PATCH 15/34] staging:r8188eu: remove Antenna_(Lfet|Right) enumeration items Ivan Safonov
2016-10-07 18:01 ` [PATCH 16/34] staging:r8188eu: remove rf_chip member of hal_data_8188e structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 17/34] staging:r8188eu: remove RF_TYPE_8190P enumeration Ivan Safonov
2016-10-07 18:01 ` [PATCH 18/34] staging:r8188eu: remove NumTotalRFPath member of hal_data_8188e structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 19/34] staging:r8188eu: refactor rtl88eu_dm_txpower_tracking_callback_thermalmeter function Ivan Safonov
2016-10-07 18:01 ` [PATCH 20/34] staging:r8188eu: remove bTXPowerTrackingInit member of odm_rf_cal structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 21/34] staging:r8188eu: remove ANTTEST(ALL|A|B) definitions Ivan Safonov
2016-10-07 18:01 ` [PATCH 22/34] staging:r8188eu: remove rtw_endofpktfile function Ivan Safonov
2016-10-07 18:01 ` [PATCH 23/34] staging:r8188eu: remove padapter and free_sz arguments of rtw_os_xmit_resource_free function Ivan Safonov
2016-10-07 18:01 ` [PATCH 24/34] staging:r8188eu: remove unused function declerations Ivan Safonov
2016-10-07 18:01 ` [PATCH 25/34] staging:r8188eu: remove prhdr local variable from rtw_free_stainfo function Ivan Safonov
2016-10-07 18:01 ` [PATCH 26/34] staging:r8188eu: change type of the precv_buf member of recv_priv structure Ivan Safonov
2016-10-07 18:01 ` Ivan Safonov [this message]
2016-10-07 18:01 ` [PATCH 28/34] staging:r8188eu: remove intf_stop member of adapter structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 29/34] staging:r8188eu: remove free_recvframe_cnt member of recv_priv structure Ivan Safonov
2016-10-07 18:01 ` [PATCH 30/34] staging:r8188eu: remove rx_pending_cnt " Ivan Safonov
2016-10-07 18:01 ` [PATCH 31/34] staging:r8188eu: remove precv_frame_buf " Ivan Safonov
2016-10-07 18:01 ` [PATCH 32/34] staging:r8188eu: change poiter type from u8 to void for pallocated_frame_buf " Ivan Safonov
2016-10-07 18:01 ` [PATCH 33/34] staging:r8188eu: refactor recvbuf2recvframe function Ivan Safonov
2016-10-07 18:01 ` [PATCH 34/34] staging:r8188eu: remove unnecessary type cast for update_recvframe_phyinfo_88e argument Ivan Safonov

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=1475863293-27587-27-git-send-email-insafonov@gmail.com \
    --to=insafonov@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=khoroshilov@ispras.ru \
    --cc=kyle.kuffermann@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome