diff options
author | Joe Perches <joe@perches.com> | 2013-02-26 16:33:11 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-11 09:24:00 -0700 |
commit | 01d0a9b474661831cd1ee5d88d5ee3fb80b55a7a (patch) | |
tree | 0cb85caae3393412204807ef5bb2312d1293b939 /drivers/staging/slicoss | |
parent | 0f1bf4baf61ca426a210bf3c98263957fa474158 (diff) |
staging: slicoss: Remove dma_addr_t cast compilation warnings
Eliminate some warnings by casting to unsigned long before
casting a dma_addr_t value to a pointer.
btw:
Does slicoss always work on x86-32?
Is a pshmem guaranteed to be accessible
by a 32 bit address?
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/slicoss')
-rw-r--r-- | drivers/staging/slicoss/slicoss.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 58a00c2db33..c8375a26816 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -999,7 +999,8 @@ static void slic_link_upr_complete(struct adapter *adapter, u32 isr) if ((isr & ISR_UPCERR) || (isr & ISR_UPCBSY)) { struct slic_shmem *pshmem; - pshmem = (struct slic_shmem *)adapter->phys_shmem; + pshmem = (struct slic_shmem *)(unsigned long) + adapter->phys_shmem; #if BITS_PER_LONG == 64 slic_upr_queue_request(adapter, SLIC_UPR_RLSR, @@ -1631,10 +1632,11 @@ retry_rcvqfill: #endif skb = alloc_skb(SLIC_RCVQ_RCVBUFSIZE, GFP_ATOMIC); if (skb) { - paddr = (void *)pci_map_single(adapter->pcidev, - skb->data, - SLIC_RCVQ_RCVBUFSIZE, - PCI_DMA_FROMDEVICE); + paddr = (void *)(unsigned long) + pci_map_single(adapter->pcidev, + skb->data, + SLIC_RCVQ_RCVBUFSIZE, + PCI_DMA_FROMDEVICE); paddrl = SLIC_GET_ADDR_LOW(paddr); paddrh = SLIC_GET_ADDR_HIGH(paddr); @@ -1781,8 +1783,9 @@ static u32 slic_rcvqueue_reinsert(struct adapter *adapter, struct sk_buff *skb) struct slic_rcvbuf *rcvbuf = (struct slic_rcvbuf *)skb->head; struct device *dev; - paddr = (void *)pci_map_single(adapter->pcidev, skb->head, - SLIC_RCVQ_RCVBUFSIZE, PCI_DMA_FROMDEVICE); + paddr = (void *)(unsigned long) + pci_map_single(adapter->pcidev, skb->head, + SLIC_RCVQ_RCVBUFSIZE, PCI_DMA_FROMDEVICE); rcvbuf->status = 0; skb->next = NULL; @@ -2279,7 +2282,7 @@ static void slic_link_event_handler(struct adapter *adapter) return; } - pshmem = (struct slic_shmem *)adapter->phys_shmem; + pshmem = (struct slic_shmem *)(unsigned long)adapter->phys_shmem; #if BITS_PER_LONG == 64 status = slic_upr_request(adapter, @@ -2306,7 +2309,7 @@ static void slic_init_cleanup(struct adapter *adapter) sizeof(struct slic_shmem), adapter->pshmem, adapter->phys_shmem); adapter->pshmem = NULL; - adapter->phys_shmem = (dma_addr_t) NULL; + adapter->phys_shmem = (dma_addr_t)(unsigned long)NULL; } if (adapter->pingtimerset) { @@ -2880,7 +2883,8 @@ static int slic_if_init(struct adapter *adapter) mdelay(1); if (!adapter->isp_initialized) { - pshmem = (struct slic_shmem *)adapter->phys_shmem; + pshmem = (struct slic_shmem *)(unsigned long) + adapter->phys_shmem; spin_lock_irqsave(&adapter->bit64reglock.lock, adapter->bit64reglock.flags); @@ -3282,7 +3286,8 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter) } slic_reg32_write(&slic_regs->slic_icr, ICR_INT_OFF, FLUSH); mdelay(1); - pshmem = (struct slic_shmem *)adapter->phys_shmem; + pshmem = (struct slic_shmem *)(unsigned long) + adapter->phys_shmem; spin_lock_irqsave(&adapter->bit64reglock.lock, adapter->bit64reglock.flags); |