Commit 849e8caa477d72cf153e5c0b6ce0c00b89738abb

Authored by David Howells
Committed by David S. Miller
1 parent cba5cbd155

atm: fix direct casts of pointers to u32 in the InterPhase driver

Fix direct casts of pointers to u32 in the InterPhase ATM driver.  These are
all arguments being passed to printk() calls.  So drop the cast and change the
%x to a %p.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 20 additions and 20 deletions Side-by-side Diff

drivers/atm/iphase.c
... ... @@ -156,8 +156,8 @@
156 156 }
157 157 iavcc_r->vc_desc_cnt--;
158 158 dev->desc_tbl[desc1 -1].timestamp = 0;
159   - IF_EVENT(printk("ia_hack: return_q skb = 0x%x desc = %d\n",
160   - (u32)dev->desc_tbl[desc1 -1].txskb, desc1);)
  159 + IF_EVENT(printk("ia_hack: return_q skb = 0x%p desc = %d\n",
  160 + dev->desc_tbl[desc1 -1].txskb, desc1);)
161 161 if (iavcc_r->pcr < dev->rate_limit) {
162 162 IA_SKB_STATE (dev->desc_tbl[desc1-1].txskb) |= IA_TX_DONE;
163 163 if (ia_enque_rtn_q(&dev->tx_return_q, dev->desc_tbl[desc1 -1]) < 0)
... ... @@ -527,8 +527,8 @@
527 527 inc = 0;
528 528 testSlot = idealSlot;
529 529 TstSchedTbl = (u16*)(SchedTbl+testSlot); //set index and read in value
530   - IF_CBR(printk("CBR Testslot 0x%x AT Location 0x%x, NumToAssign=%d\n",
531   - testSlot, (u32)TstSchedTbl,toBeAssigned);)
  530 + IF_CBR(printk("CBR Testslot 0x%x AT Location 0x%p, NumToAssign=%d\n",
  531 + testSlot, TstSchedTbl,toBeAssigned);)
532 532 memcpy((caddr_t)&cbrVC,(caddr_t)TstSchedTbl,sizeof(cbrVC));
533 533 while (cbrVC) // If another VC at this location, we have to keep looking
534 534 {
... ... @@ -536,8 +536,8 @@
536 536 testSlot = idealSlot - inc;
537 537 if (testSlot < 0) { // Wrap if necessary
538 538 testSlot += dev->CbrTotEntries;
539   - IF_CBR(printk("Testslot Wrap. STable Start=0x%x,Testslot=%d\n",
540   - (u32)SchedTbl,testSlot);)
  539 + IF_CBR(printk("Testslot Wrap. STable Start=0x%p,Testslot=%d\n",
  540 + SchedTbl,testSlot);)
541 541 }
542 542 TstSchedTbl = (u16 *)(SchedTbl + testSlot); // set table index
543 543 memcpy((caddr_t)&cbrVC,(caddr_t)TstSchedTbl,sizeof(cbrVC));
... ... @@ -552,8 +552,8 @@
552 552 }
553 553 // set table index and read in value
554 554 TstSchedTbl = (u16*)(SchedTbl + testSlot);
555   - IF_CBR(printk("Reading CBR Tbl from 0x%x, CbrVal=0x%x Iteration %d\n",
556   - (u32)TstSchedTbl,cbrVC,inc);)
  555 + IF_CBR(printk("Reading CBR Tbl from 0x%p, CbrVal=0x%x Iteration %d\n",
  556 + TstSchedTbl,cbrVC,inc);)
557 557 memcpy((caddr_t)&cbrVC,(caddr_t)TstSchedTbl,sizeof(cbrVC));
558 558 } /* while */
559 559 // Move this VCI number into this location of the CBR Sched table.
560 560  
... ... @@ -1427,11 +1427,11 @@
1427 1427 /* We know this is 32bit bus addressed so the following is safe */
1428 1428 writel(iadev->rx_dle_dma & 0xfffff000,
1429 1429 iadev->dma + IPHASE5575_RX_LIST_ADDR);
1430   - IF_INIT(printk("Tx Dle list addr: 0x%08x value: 0x%0x\n",
1431   - (u32)(iadev->dma+IPHASE5575_TX_LIST_ADDR),
  1430 + IF_INIT(printk("Tx Dle list addr: 0x%p value: 0x%0x\n",
  1431 + iadev->dma+IPHASE5575_TX_LIST_ADDR,
1432 1432 *(u32*)(iadev->dma+IPHASE5575_TX_LIST_ADDR));
1433   - printk("Rx Dle list addr: 0x%08x value: 0x%0x\n",
1434   - (u32)(iadev->dma+IPHASE5575_RX_LIST_ADDR),
  1433 + printk("Rx Dle list addr: 0x%p value: 0x%0x\n",
  1434 + iadev->dma+IPHASE5575_RX_LIST_ADDR,
1435 1435 *(u32*)(iadev->dma+IPHASE5575_RX_LIST_ADDR));)
1436 1436  
1437 1437 writew(0xffff, iadev->reass_reg+REASS_MASK_REG);
... ... @@ -1470,7 +1470,7 @@
1470 1470 buf_desc_ptr++;
1471 1471 rx_pkt_start += iadev->rx_buf_sz;
1472 1472 }
1473   - IF_INIT(printk("Rx Buffer desc ptr: 0x%0x\n", (u32)(buf_desc_ptr));)
  1473 + IF_INIT(printk("Rx Buffer desc ptr: 0x%p\n", buf_desc_ptr);)
1474 1474 i = FREE_BUF_DESC_Q*iadev->memSize;
1475 1475 writew(i >> 16, iadev->reass_reg+REASS_QUEUE_BASE);
1476 1476 writew(i, iadev->reass_reg+FREEQ_ST_ADR);
... ... @@ -1487,7 +1487,7 @@
1487 1487 *freeq_start = (u_short)i;
1488 1488 freeq_start++;
1489 1489 }
1490   - IF_INIT(printk("freeq_start: 0x%0x\n", (u32)freeq_start);)
  1490 + IF_INIT(printk("freeq_start: 0x%p\n", freeq_start);)
1491 1491 /* Packet Complete Queue */
1492 1492 i = (PKT_COMP_Q * iadev->memSize) & 0xffff;
1493 1493 writew(i, iadev->reass_reg+PCQ_ST_ADR);
... ... @@ -1713,7 +1713,7 @@
1713 1713 IA_SKB_STATE(skb) |= IA_DLED;
1714 1714 skb_queue_tail(&iavcc->txing_skb, skb);
1715 1715 }
1716   - IF_EVENT(printk("tx_dle_intr: enque skb = 0x%x \n", (u32)skb);)
  1716 + IF_EVENT(printk("tx_dle_intr: enque skb = 0x%p \n", skb);)
1717 1717 if (++dle == iadev->tx_dle_q.end)
1718 1718 dle = iadev->tx_dle_q.start;
1719 1719 }
... ... @@ -2044,8 +2044,8 @@
2044 2044 writew(tmp16, iadev->seg_reg+CBR_TAB_END+1); // CBR_PTR;
2045 2045 tmp16 = (CBR_SCHED_TABLE*iadev->memSize + iadev->num_vc*6 - 2) >> 1;
2046 2046 writew(tmp16, iadev->seg_reg+CBR_TAB_END);
2047   - IF_INIT(printk("iadev->seg_reg = 0x%x CBR_PTR_BASE = 0x%x\n",
2048   - (u32)iadev->seg_reg, readw(iadev->seg_reg+CBR_PTR_BASE));)
  2047 + IF_INIT(printk("iadev->seg_reg = 0x%p CBR_PTR_BASE = 0x%x\n",
  2048 + iadev->seg_reg, readw(iadev->seg_reg+CBR_PTR_BASE));)
2049 2049 IF_INIT(printk("CBR_TAB_BEG = 0x%x, CBR_TAB_END = 0x%x, CBR_PTR = 0x%x\n",
2050 2050 readw(iadev->seg_reg+CBR_TAB_BEG), readw(iadev->seg_reg+CBR_TAB_END),
2051 2051 readw(iadev->seg_reg+CBR_TAB_END+1));)
... ... @@ -2963,8 +2963,8 @@
2963 2963  
2964 2964 /* Put the packet in a tx buffer */
2965 2965 trailer = iadev->tx_buf[desc-1].cpcs;
2966   - IF_TX(printk("Sent: skb = 0x%x skb->data: 0x%x len: %d, desc: %d\n",
2967   - (u32)skb, (u32)skb->data, skb->len, desc);)
  2966 + IF_TX(printk("Sent: skb = 0x%p skb->data: 0x%p len: %d, desc: %d\n",
  2967 + skb, skb->data, skb->len, desc);)
2968 2968 trailer->control = 0;
2969 2969 /*big endian*/
2970 2970 trailer->length = ((skb->len & 0xff) << 8) | ((skb->len & 0xff00) >> 8);
... ... @@ -3181,7 +3181,7 @@
3181 3181 }
3182 3182 dev->dev_data = iadev;
3183 3183 IF_INIT(printk(DEV_LABEL "registered at (itf :%d)\n", dev->number);)
3184   - IF_INIT(printk("dev_id = 0x%x iadev->LineRate = %d \n", (u32)dev,
  3184 + IF_INIT(printk("dev_id = 0x%p iadev->LineRate = %d \n", dev,
3185 3185 iadev->LineRate);)
3186 3186  
3187 3187 pci_set_drvdata(pdev, dev);