Staging: et131x: fbr_desc is now only sane types
authorAlan Cox <alan@linux.intel.com>
Mon, 18 Jan 2010 15:32:50 +0000 (15:32 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:42:49 +0000 (16:42 -0800)
Clean up the typdef for fbr_desc itself so we know it is done

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/et131x/et1310_rx.c
drivers/staging/et131x/et1310_rx.h

index 2600b2f7a623f03b6fa477c88abc8cb35c08f7cd..6ae8f119d78ebd4b0807cc274ff403ae12fe4d44 100644 (file)
@@ -170,7 +170,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
 #endif
 
        /* Allocate an area of memory for Free Buffer Ring 1 */
-       bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff;
+       bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) + 0xfff;
        rx_ring->pFbr1RingVa = pci_alloc_consistent(adapter->pdev,
                                                    bufsize,
                                                    &rx_ring->pFbr1RingPa);
@@ -199,7 +199,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
 
 #ifdef USE_FBR0
        /* Allocate an area of memory for Free Buffer Ring 0 */
-       bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff;
+       bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries) + 0xfff;
        rx_ring->pFbr0RingVa = pci_alloc_consistent(adapter->pdev,
                                                    bufsize,
                                                    &rx_ring->pFbr0RingPa);
@@ -450,12 +450,11 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
                rx_ring->pFbr1RingVa = (void *)((uint8_t *)
                                rx_ring->pFbr1RingVa - rx_ring->Fbr1offset);
 
-               bufsize =
-                   (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff;
+               bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries)
+                                                               + 0xfff;
 
-               pci_free_consistent(adapter->pdev,
-                                   bufsize,
-                                   rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa);
+               pci_free_consistent(adapter->pdev, bufsize,
+                                rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa);
 
                rx_ring->pFbr1RingVa = NULL;
        }
@@ -484,8 +483,8 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
                rx_ring->pFbr0RingVa = (void *)((uint8_t *)
                                rx_ring->pFbr0RingVa - rx_ring->Fbr0offset);
 
-               bufsize =
-                   (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff;
+               bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries)
+                                                                + 0xfff;
 
                pci_free_consistent(adapter->pdev,
                                    bufsize,
@@ -596,7 +595,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
 {
        struct _RXDMA_t __iomem *rx_dma = &etdev->regs->rxdma;
        struct _rx_ring_t *rx_local = &etdev->RxRing;
-       PFBR_DESC_t fbr_entry;
+       struct fbr_desc *fbr_entry;
        u32 entry;
        u32 psr_num_des;
        unsigned long flags;
@@ -636,7 +635,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
        rx_local->local_psr_full = 0;
 
        /* Now's the best time to initialize FBR1 contents */
-       fbr_entry = (PFBR_DESC_t) rx_local->pFbr1RingVa;
+       fbr_entry = (struct fbr_desc *) rx_local->pFbr1RingVa;
        for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) {
                fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry];
                fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry];
@@ -661,7 +660,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
 
 #ifdef USE_FBR0
        /* Now's the best time to initialize FBR0 contents */
-       fbr_entry = (PFBR_DESC_t) rx_local->pFbr0RingVa;
+       fbr_entry = (struct fbr_desc *) rx_local->pFbr0RingVa;
        for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) {
                fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry];
                fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry];
@@ -1116,9 +1115,9 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
                spin_lock_irqsave(&etdev->FbrLock, flags);
 
                if (ri == 1) {
-                       PFBR_DESC_t next =
-                           (PFBR_DESC_t) (rx_local->pFbr1RingVa) +
-                           INDEX10(rx_local->local_Fbr1_full);
+                       struct fbr_desc *next =
+                           (struct fbr_desc *) (rx_local->pFbr1RingVa) +
+                                           INDEX10(rx_local->local_Fbr1_full);
 
                        /* Handle the Free Buffer Ring advancement here. Write
                         * the PA / Buffer Index for the returned buffer into
@@ -1134,9 +1133,9 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
                }
 #ifdef USE_FBR0
                else {
-                       PFBR_DESC_t next =
-                           (PFBR_DESC_t) rx_local->pFbr0RingVa +
-                           INDEX10(rx_local->local_Fbr0_full);
+                       struct fbr_desc *next = (struct fbr_desc *)
+                               rx_local->pFbr0RingVa +
+                                       INDEX10(rx_local->local_Fbr0_full);
 
                        /* Handle the Free Buffer Ring advancement here. Write
                         * the PA / Buffer Index for the returned buffer into
index db252cafa94ae6924fa112ec338ac7cc97a39511..afa670e57179939cbe3be46983d39fff2113c8d2 100644 (file)
 #define ALCATEL_BROADCAST_PKT  0x02000000
 
 /* typedefs for Free Buffer Descriptors */
-typedef struct _FBR_DESC_t {
+struct fbr_desc
+{
        u32 addr_lo;
        u32 addr_hi;
        u32 word2;              /* Bits 10-31 reserved, 0-9 descriptor */
-} FBR_DESC_t, *PFBR_DESC_t;
+};
 
 /* Typedefs for Packet Status Ring Descriptors */
 typedef union _PKT_STAT_DESC_WORD0_t {