aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-10 03:06:58 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-10 03:06:58 -0400
commit5d337d6f64d150b6577972cc23f709ee85f66881 (patch)
treeece22e5268bc869902827ceefd281fbb864158fe /drivers/net
parentc4e9b56e24422e71424b24eee27c2b134a191d7b (diff)
farsync: Fix compile warnings.
drivers/net/wan/farsync.c: In function 'fst_intr_rx': drivers/net/wan/farsync.c:1312: warning: cast to pointer from integer of different size drivers/net/wan/farsync.c: In function 'do_bottom_half_tx': drivers/net/wan/farsync.c:1407: warning: cast to pointer from integer of different size The "skb" and "mem" arguments being passed here are DMA addresses being programmed into the hardware registers, so pass them as the type that they actually are. And use the correct printf formatting in debug logging statements for these things to match the type change. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wan/farsync.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index ad7719fe6d0a..e050bd65e037 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -885,20 +885,21 @@ fst_rx_dma_complete(struct fst_card_info *card, struct fst_port_info *port,
885 * Receive a frame through the DMA 885 * Receive a frame through the DMA
886 */ 886 */
887static inline void 887static inline void
888fst_rx_dma(struct fst_card_info *card, unsigned char *skb, 888fst_rx_dma(struct fst_card_info *card, dma_addr_t skb,
889 unsigned char *mem, int len) 889 dma_addr_t mem, int len)
890{ 890{
891 /* 891 /*
892 * This routine will setup the DMA and start it 892 * This routine will setup the DMA and start it
893 */ 893 */
894 894
895 dbg(DBG_RX, "In fst_rx_dma %p %p %d\n", skb, mem, len); 895 dbg(DBG_RX, "In fst_rx_dma %lx %lx %d\n",
896 (unsigned long) skb, (unsigned long) mem, len);
896 if (card->dmarx_in_progress) { 897 if (card->dmarx_in_progress) {
897 dbg(DBG_ASS, "In fst_rx_dma while dma in progress\n"); 898 dbg(DBG_ASS, "In fst_rx_dma while dma in progress\n");
898 } 899 }
899 900
900 outl((unsigned long) skb, card->pci_conf + DMAPADR0); /* Copy to here */ 901 outl(skb, card->pci_conf + DMAPADR0); /* Copy to here */
901 outl((unsigned long) mem, card->pci_conf + DMALADR0); /* from here */ 902 outl(mem, card->pci_conf + DMALADR0); /* from here */
902 outl(len, card->pci_conf + DMASIZ0); /* for this length */ 903 outl(len, card->pci_conf + DMASIZ0); /* for this length */
903 outl(0x00000000c, card->pci_conf + DMADPR0); /* In this direction */ 904 outl(0x00000000c, card->pci_conf + DMADPR0); /* In this direction */
904 905
@@ -1309,8 +1310,8 @@ fst_intr_rx(struct fst_card_info *card, struct fst_port_info *port)
1309 card->dma_port_rx = port; 1310 card->dma_port_rx = port;
1310 card->dma_len_rx = len; 1311 card->dma_len_rx = len;
1311 card->dma_rxpos = rxp; 1312 card->dma_rxpos = rxp;
1312 fst_rx_dma(card, (char *) card->rx_dma_handle_card, 1313 fst_rx_dma(card, card->rx_dma_handle_card,
1313 (char *) BUF_OFFSET(rxBuffer[pi][rxp][0]), len); 1314 BUF_OFFSET(rxBuffer[pi][rxp][0]), len);
1314 } 1315 }
1315 if (rxp != port->rxpos) { 1316 if (rxp != port->rxpos) {
1316 dbg(DBG_ASS, "About to increment rxpos by more than 1\n"); 1317 dbg(DBG_ASS, "About to increment rxpos by more than 1\n");