diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-12-13 16:19:54 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-05 16:58:44 -0500 |
commit | a4182c50bcd6a20caae82c202436fe892f642150 (patch) | |
tree | 31b0500d09b4740aac9295f8aefdea980b5ee25d /drivers/net/spider_net.c | |
parent | 80dab7c7e5b7c4e53e9423c22375bfd9cbf7f2c3 (diff) |
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>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index f58741239196..96a7e771daa4 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -367,21 +367,20 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card) | |||
367 | } | 367 | } |
368 | 368 | ||
369 | /** | 369 | /** |
370 | * spider_net_prepare_rx_descr - reinitializes a rx descriptor | 370 | * spider_net_prepare_rx_descr - Reinitialize RX descriptor |
371 | * @card: card structure | 371 | * @card: card structure |
372 | * @descr: descriptor to re-init | 372 | * @descr: descriptor to re-init |
373 | * | 373 | * |
374 | * return 0 on succes, <0 on failure | 374 | * Return 0 on succes, <0 on failure. |
375 | * | 375 | * |
376 | * allocates a new rx skb, iommu-maps it and attaches it to the descriptor. | 376 | * Allocates a new rx skb, iommu-maps it and attaches it to the |
377 | * Activate the descriptor state-wise | 377 | * descriptor. Mark the descriptor as activated, ready-to-use. |
378 | */ | 378 | */ |
379 | static int | 379 | static int |
380 | spider_net_prepare_rx_descr(struct spider_net_card *card, | 380 | spider_net_prepare_rx_descr(struct spider_net_card *card, |
381 | struct spider_net_descr *descr) | 381 | struct spider_net_descr *descr) |
382 | { | 382 | { |
383 | dma_addr_t buf; | 383 | dma_addr_t buf; |
384 | int error = 0; | ||
385 | int offset; | 384 | int offset; |
386 | int bufsize; | 385 | int bufsize; |
387 | 386 | ||
@@ -409,7 +408,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, | |||
409 | (SPIDER_NET_RXBUF_ALIGN - 1); | 408 | (SPIDER_NET_RXBUF_ALIGN - 1); |
410 | if (offset) | 409 | if (offset) |
411 | skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset); | 410 | skb_reserve(descr->skb, SPIDER_NET_RXBUF_ALIGN - offset); |
412 | /* io-mmu-map the skb */ | 411 | /* iommu-map the skb */ |
413 | buf = pci_map_single(card->pdev, descr->skb->data, | 412 | buf = pci_map_single(card->pdev, descr->skb->data, |
414 | SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); | 413 | SPIDER_NET_MAX_FRAME, PCI_DMA_FROMDEVICE); |
415 | descr->buf_addr = buf; | 414 | descr->buf_addr = buf; |
@@ -424,7 +423,7 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, | |||
424 | SPIDER_NET_DMAC_NOINTR_COMPLETE; | 423 | SPIDER_NET_DMAC_NOINTR_COMPLETE; |
425 | } | 424 | } |
426 | 425 | ||
427 | return error; | 426 | return 0; |
428 | } | 427 | } |
429 | 428 | ||
430 | /** | 429 | /** |