staging:rtl8192u: typedef struct tx_desc_819x_usb > struct tx_desc_819x_usb
authorJohn Whitmore <johnfwhitmore@gmail.com>
Wed, 11 Jul 2018 19:21:40 +0000 (20:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Jul 2018 09:40:45 +0000 (11:40 +0200)
Change structure tx_desc_819x_usb from being typedef to being a simple
structure, without the typedef.

checkpatch warns about defining new types in code.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U.h
drivers/staging/rtl8192u/r8192U_core.c

index 37aa361..fa451c6 100644 (file)
@@ -177,7 +177,7 @@ extern u32 rt_global_debug_component;
 #define        CCK_Table_length        12
 
 /* For rtl819x */
-typedef struct _tx_desc_819x_usb {
+struct tx_desc_819x_usb {
        /* DWORD 0 */
        u16     PktSize;
        u8      Offset;
@@ -213,7 +213,7 @@ typedef struct _tx_desc_819x_usb {
        u32     Reserved5;
        u32     Reserved6;
        u32     Reserved7;
-} tx_desc_819x_usb, *ptx_desc_819x_usb;
+};
 
 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
 typedef struct _tx_desc_819x_usb_aggr_subframe {
@@ -371,7 +371,7 @@ typedef struct rx_drvinfo_819x_usb {
 #define MAX_FIRMWARE_INFORMATION_SIZE   32
 #define MAX_802_11_HEADER_LENGTH        (40 + MAX_FIRMWARE_INFORMATION_SIZE)
 #define ENCRYPTION_MAX_OVERHEAD                128
-#define        USB_HWDESC_HEADER_LEN           sizeof(tx_desc_819x_usb)
+#define        USB_HWDESC_HEADER_LEN           sizeof(struct tx_desc_819x_usb)
 #define TX_PACKET_SHIFT_BYTES          (USB_HWDESC_HEADER_LEN + sizeof(tx_fwinfo_819x_usb))
 #define MAX_FRAGMENT_COUNT             8
 #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
index 848239e..a2a1075 100644 (file)
@@ -1462,7 +1462,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
-       tx_desc_819x_usb *tx_desc = (tx_desc_819x_usb *)skb->data;
+       struct tx_desc_819x_usb *tx_desc = (struct tx_desc_819x_usb *)skb->data;
        tx_fwinfo_819x_usb *tx_fwinfo =
                (tx_fwinfo_819x_usb *)(skb->data + USB_HWDESC_HEADER_LEN);
        struct usb_device *udev = priv->udev;
@@ -1535,7 +1535,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
        }
 
        /* Fill Tx descriptor */
-       memset(tx_desc, 0, sizeof(tx_desc_819x_usb));
+       memset(tx_desc, 0, sizeof(struct tx_desc_819x_usb));
        /* DWORD 0 */
        tx_desc->LINIP = 0;
        tx_desc->CmdInit = 1;