linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Whitmore <johnfwhitmore@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	aastha.gupta4104@gmail.com, keescook@chromium.org,
	pombredanne@nexb.com, kstewart@linuxfoundation.org,
	tglx@linutronix.de, John Whitmore <johnfwhitmore@gmail.com>
Subject: [PATCH 07/10] staging:rtl8192u: typedef struct rx_desc_819x_usb remove typedef
Date: Wed, 11 Jul 2018 20:21:46 +0100	[thread overview]
Message-ID: <20180711192149.21621-8-johnfwhitmore@gmail.com> (raw)
In-Reply-To: <20180711192149.21621-1-johnfwhitmore@gmail.com>

Change structure rx_desc_819x_usb from being typedef to being a simple
structure, without the typedef.

Clears a checkpatch issue, definging new types in the code.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r8192U.h      |  4 ++--
 drivers/staging/rtl8192u/r8192U_core.c | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
index d9dbd3ca3dac..d7f090c1bb44 100644
--- a/drivers/staging/rtl8192u/r8192U.h
+++ b/drivers/staging/rtl8192u/r8192U.h
@@ -279,7 +279,7 @@ struct rtl8192_rx_info {
 	u8 out_pipe;
 };
 
-typedef struct rx_desc_819x_usb {
+struct rx_desc_819x_usb {
 	/* DOWRD 0 */
 	u16                 Length:14;
 	u16                 CRC32:1;
@@ -292,7 +292,7 @@ typedef struct rx_desc_819x_usb {
 
 	/* DWORD 1 */
 	u32                 Reserved2;
-} rx_desc_819x_usb, *prx_desc_819x_usb;
+};
 
 #ifdef USB_RX_AGGREGATION_SUPPORT
 typedef struct _rx_desc_819x_usb_aggr_subframe {
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 75bbcc115141..655aae06f8a4 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -739,7 +739,7 @@ static void rtl8192_rx_isr(struct urb *urb);
 
 static u32 get_rxpacket_shiftbytes_819xusb(struct ieee80211_rx_stats *pstats)
 {
-	return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize
+	return (sizeof(struct rx_desc_819x_usb) + pstats->RxDrvInfoSize
 		+ pstats->RxBufShift);
 }
 
@@ -4633,7 +4633,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
 	rx_drvinfo_819x_usb  *driver_info = NULL;
 
 	/* Get Rx Descriptor Information */
-	rx_desc_819x_usb *desc = (rx_desc_819x_usb *)skb->data;
+	struct rx_desc_819x_usb *desc = (struct rx_desc_819x_usb *)skb->data;
 
 	stats->Length = desc->Length;
 	stats->RxDrvInfoSize = desc->RxDrvInfoSize;
@@ -4659,7 +4659,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
 	if (stats->RxDrvInfoSize != 0) {
 		driver_info = (rx_drvinfo_819x_usb *)(
 				skb->data
-				+ sizeof(rx_desc_819x_usb)
+				+ sizeof(struct rx_desc_819x_usb)
 				+ stats->RxBufShift
 			      );
 		/* unit: 0.5M */
@@ -4704,7 +4704,7 @@ static void query_rxdesc_status(struct sk_buff *skb,
 				 driver_info->FirstAGGR, driver_info->PartAggr);
 	}
 
-	skb_pull(skb, sizeof(rx_desc_819x_usb));
+	skb_pull(skb, sizeof(struct rx_desc_819x_usb));
 	/* Get Total offset of MPDU Frame Body */
 	if ((stats->RxBufShift + stats->RxDrvInfoSize) > 0) {
 		stats->bShift = 1;
@@ -4733,7 +4733,7 @@ static void rtl8192_rx_nomal(struct sk_buff *skb)
 	bool unicast_packet = false;
 
 	/* 20 is for ps-poll */
-	if ((skb->len >= (20 + sizeof(rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
+	if ((skb->len >= (20 + sizeof(struct rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
 		/* first packet should not contain Rx aggregation header */
 		query_rxdesc_status(skb, &stats, false);
 		/* TODO */
@@ -4809,7 +4809,7 @@ static void rtl819xusb_process_received_packet(
 static void query_rx_cmdpkt_desc_status(struct sk_buff *skb,
 					struct ieee80211_rx_stats *stats)
 {
-	rx_desc_819x_usb *desc = (rx_desc_819x_usb *)skb->data;
+	struct rx_desc_819x_usb *desc = (struct rx_desc_819x_usb *)skb->data;
 
 	/* Get Rx Descriptor Information */
 	stats->virtual_address = (u8 *)skb->data;
@@ -4835,7 +4835,7 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)
 		.freq = IEEE80211_24GHZ_BAND,
 	};
 
-	if ((skb->len >= (20 + sizeof(rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
+	if ((skb->len >= (20 + sizeof(struct rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
 		query_rx_cmdpkt_desc_status(skb, &stats);
 		/* prfd->queue_id = 1; */
 
-- 
2.18.0


  parent reply	other threads:[~2018-07-11 19:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 19:21 [0/10] staging:rtl8192u: One significant change John Whitmore
2018-07-11 19:21 ` [PATCH 01/10] staging:rtl8192u: typedef struct tx_desc_819x_usb > struct tx_desc_819x_usb John Whitmore
2018-07-11 19:21 ` [PATCH 02/10] staging:rtl8192u: trim multiple blank lines - Coding Style John Whitmore
2018-07-11 19:21 ` [PATCH 03/10] staging:rtl8192u: remove unused structure tx_desc_819x_usb_aggr_subframe John Whitmore
2018-07-11 19:21 ` [PATCH 04/10] staging:rtl8192u: Rename file macro to avoid camel case - Coding Style John Whitmore
2018-07-13  9:39   ` Greg KH
2018-07-13 11:26     ` John Whitmore
2018-07-11 19:21 ` [PATCH 05/10] staging:rtl8192u: typedef struct tx_desc_cmd_819x_usb remove typedef John Whitmore
2018-07-11 19:21 ` [PATCH 06/10] staging:rtl8192u: typedef struct tx_fwinfo_819x_usb " John Whitmore
2018-07-11 19:21 ` John Whitmore [this message]
2018-07-11 19:21 ` [PATCH 08/10] staging:rtl8192u: Remove struct rx_desc_819x_usb_aggr_subframe John Whitmore
2018-07-11 19:21 ` [PATCH 09/10] staging:rtl8192u: remove typedef from struct rx_drvinfo_819x_usb John Whitmore
2018-07-11 19:21 ` [PATCH 10/10] staging:rtl8192u: Change struct r8192_priv member Rf_Mode from u8 > enum John Whitmore

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=20180711192149.21621-8-johnfwhitmore@gmail.com \
    --to=johnfwhitmore@gmail.com \
    --cc=aastha.gupta4104@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).