staging: vt6655: replace typedef struct tagDEVICE_RD_INFO
authorMalcolm Priestley <tvboxspy@gmail.com>
Sat, 15 Aug 2015 20:57:34 +0000 (21:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:26 +0000 (18:24 -0700)
with struct vnt_rd_info

volatile is removed because it will generate a warning
(in any case this member is not) and renaming rd_info.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/desc.h
drivers/staging/vt6655/device.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/dpc.c

index eb0c7c3c987dd3a538c6c0f2925213d52859b9e6..752c54683c7f245336e57f5fc924574288d18a5f 100644 (file)
  * leads error.
  */
 
-typedef struct tagDEVICE_RD_INFO {
+struct vnt_rd_info {
        struct sk_buff *skb;
        dma_addr_t  skb_dma;
-} DEVICE_RD_INFO,   *PDEVICE_RD_INFO;
+};
 
 struct vnt_rdes0 {
        volatile __le16 res_count;
@@ -201,7 +201,7 @@ typedef struct tagSRxDesc {
        volatile __le32 buff_addr;
        volatile __le32 next_desc;
        struct tagSRxDesc *next __aligned(8);
-       volatile PDEVICE_RD_INFO pRDInfo __aligned(8);
+       struct vnt_rd_info *rd_info __aligned(8);
 } __attribute__ ((__packed__))
 SRxDesc, *PSRxDesc;
 typedef const SRxDesc *PCSRxDesc;
index c9fa6ef42d340d6cb5e48343e503cbdaec43e7c4..80cc17005d8fac1225613294a8acd7cc36a1247c 100644 (file)
@@ -410,9 +410,9 @@ struct vnt_private {
        struct ieee80211_low_level_stats low_stats;
 };
 
-static inline PDEVICE_RD_INFO alloc_rd_info(void)
+static inline struct vnt_rd_info *alloc_rd_info(void)
 {
-       return kzalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC);
+       return kzalloc(sizeof(struct vnt_rd_info), GFP_ATOMIC);
 }
 
 static inline struct vnt_td_info *alloc_td_info(void)
index 22c195757f89b4cf936f7f1aeb5cad61aa26659e..defdcc015d126dcad426ce65d5b89fa1855905d1 100644 (file)
@@ -622,7 +622,7 @@ static void device_init_rd0_ring(struct vnt_private *pDevice)
        /* Init the RD0 ring entries */
        for (i = 0; i < pDevice->sOpts.nRxDescs0; i ++, curr += sizeof(SRxDesc)) {
                pDesc = &(pDevice->aRD0Ring[i]);
-               pDesc->pRDInfo = alloc_rd_info();
+               pDesc->rd_info = alloc_rd_info();
 
                if (!device_alloc_rx_buf(pDevice, pDesc))
                        dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
@@ -645,7 +645,7 @@ static void device_init_rd1_ring(struct vnt_private *pDevice)
        /* Init the RD1 ring entries */
        for (i = 0; i < pDevice->sOpts.nRxDescs1; i ++, curr += sizeof(SRxDesc)) {
                pDesc = &(pDevice->aRD1Ring[i]);
-               pDesc->pRDInfo = alloc_rd_info();
+               pDesc->rd_info = alloc_rd_info();
 
                if (!device_alloc_rx_buf(pDevice, pDesc))
                        dev_err(&pDevice->pcid->dev, "can not alloc rx bufs\n");
@@ -665,14 +665,14 @@ static void device_free_rd0_ring(struct vnt_private *pDevice)
 
        for (i = 0; i < pDevice->sOpts.nRxDescs0; i++) {
                PSRxDesc        pDesc = &(pDevice->aRD0Ring[i]);
-               PDEVICE_RD_INFO  pRDInfo = pDesc->pRDInfo;
+               struct vnt_rd_info *rd_info = pDesc->rd_info;
 
-               dma_unmap_single(&pDevice->pcid->dev, pRDInfo->skb_dma,
+               dma_unmap_single(&pDevice->pcid->dev, rd_info->skb_dma,
                                 pDevice->rx_buf_sz, DMA_FROM_DEVICE);
 
-               dev_kfree_skb(pRDInfo->skb);
+               dev_kfree_skb(rd_info->skb);
 
-               kfree(pDesc->pRDInfo);
+               kfree(pDesc->rd_info);
        }
 }
 
@@ -682,14 +682,14 @@ static void device_free_rd1_ring(struct vnt_private *pDevice)
 
        for (i = 0; i < pDevice->sOpts.nRxDescs1; i++) {
                PSRxDesc        pDesc = &(pDevice->aRD1Ring[i]);
-               PDEVICE_RD_INFO  pRDInfo = pDesc->pRDInfo;
+               struct vnt_rd_info *rd_info = pDesc->rd_info;
 
-               dma_unmap_single(&pDevice->pcid->dev, pRDInfo->skb_dma,
+               dma_unmap_single(&pDevice->pcid->dev, rd_info->skb_dma,
                                 pDevice->rx_buf_sz, DMA_FROM_DEVICE);
 
-               dev_kfree_skb(pRDInfo->skb);
+               dev_kfree_skb(rd_info->skb);
 
-               kfree(pDesc->pRDInfo);
+               kfree(pDesc->rd_info);
        }
 }
 
@@ -783,7 +783,7 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx)
                if (works++ > 15)
                        break;
 
-               if (!pRD->pRDInfo->skb)
+               if (!pRD->rd_info->skb)
                        break;
 
                if (vnt_receive_frame(pDevice, pRD)) {
@@ -803,7 +803,7 @@ static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx)
 
 static bool device_alloc_rx_buf(struct vnt_private *pDevice, PSRxDesc pRD)
 {
-       PDEVICE_RD_INFO pRDInfo = pRD->pRDInfo;
+       struct vnt_rd_info *pRDInfo = pRD->rd_info;
 
        pRDInfo->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
        if (pRDInfo->skb == NULL)
index ef39cbe28940980e2d74702030fac14217aeeca9..46591859f5447b226b01778ce44ffae5cedcd0a5 100644 (file)
@@ -134,7 +134,7 @@ static bool vnt_rx_data(struct vnt_private *priv, struct sk_buff *skb,
 
 bool vnt_receive_frame(struct vnt_private *priv, PSRxDesc curr_rd)
 {
-       PDEVICE_RD_INFO rd_info = curr_rd->pRDInfo;
+       struct vnt_rd_info *rd_info = curr_rd->rd_info;
        struct sk_buff *skb;
        u16 frame_size;