Spidernet Remove unused variable
Remove unused variable; this makes code easier to read. Tweak commentary. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: James K Lewis <jklewis@us.ibm.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
80dab7c7e5
commit
a4182c50bc
@ -367,21 +367,20 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spider_net_prepare_rx_descr - reinitializes a rx descriptor
|
* spider_net_prepare_rx_descr - Reinitialize RX descriptor
|
||||||
* @card: card structure
|
* @card: card structure
|
||||||
* @descr: descriptor to re-init
|
* @descr: descriptor to re-init
|
||||||
*
|
*
|
||||||
* return 0 on succes, <0 on failure
|
* Return 0 on succes, <0 on failure.
|
||||||
*
|
*
|
||||||
* allocates a new rx skb, iommu-maps it and attaches it to the descriptor.
|
* Allocates a new rx skb, iommu-maps it and attaches it to the
|
||||||
* Activate the descriptor state-wise
|
* descriptor. Mark the descriptor as activated, ready-to-use.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
spider_net_prepare_rx_descr(struct spider_net_card *card,
|
spider_net_prepare_rx_descr(struct spider_net_card *card,
|
||||||
struct spider_net_descr *descr)
|
struct spider_net_descr *descr)
|
||||||
{
|
{
|
||||||
dma_addr_t buf;
|
dma_addr_t buf;
|
||||||
int error = 0;
|
|
||||||
int offset;
|
int offset;
|
||||||
int bufsize;
|
int bufsize;
|
||||||
|
|
||||||
@ -409,7 +408,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
|
|||||||
(SPIDER_NET_RXBUF_ALIGN - 1);
|
(SPIDER_NET_RXBUF_ALIGN - 1);
|
||||||
if (offset)
|
if (offset)
|
||||||
skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset);
|
skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset);
|
||||||
/* io-mmu-map the skb */
|
/* iommu-map the skb */
|
||||||
buf = pci_map_single(card->pdev, descr->skb->data,
|
buf = pci_map_single(card->pdev, descr->skb->data,
|
||||||
SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
|
SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE);
|
||||||
descr->buf_addr = buf;
|
descr->buf_addr = buf;
|
||||||
@ -424,7 +423,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
|
|||||||
SPIDER_NET_DMAC_NOINTR_COMPLETE;
|
SPIDER_NET_DMAC_NOINTR_COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user