[PATCH -next] infiniband: fix cxgb4 printk format warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>

Fix printk format warnings in infiniband/hw/cxgb4:

drivers/infiniband/hw/cxgb4/cq.c:844: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'size_t'
drivers/infiniband/hw/cxgb4/qp.c:109: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'phys_addr_t'
drivers/infiniband/hw/cxgb4/qp.c:109: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'phys_addr_t'
drivers/infiniband/hw/cxgb4/qp.c:1407: warning: format '%lu' expects type 'long unsigned int', but argument 4 ha s type 'size_t'
drivers/infiniband/hw/cxgb4/qp.c:1407: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
---
Wouldn't it be Good if virt_to_phys() returned the same typed value
on all arches?

Note: cxgb4 needs MAINTAINER info.

 drivers/infiniband/hw/cxgb4/cq.c |    2 +-
 drivers/infiniband/hw/cxgb4/qp.c |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

--- linux-next-20100428.orig/drivers/infiniband/hw/cxgb4/cq.c
+++ linux-next-20100428/drivers/infiniband/hw/cxgb4/cq.c
@@ -841,7 +841,7 @@ struct ib_cq *c4iw_create_cq(struct ib_d
 		mm2->len = PAGE_SIZE;
 		insert_mmap(ucontext, mm2);
 	}
-	PDBG("%s cqid 0x%0x chp %p size %u memsize %lu, dma_addr 0x%0llx\n",
+	PDBG("%s cqid 0x%0x chp %p size %u memsize %zu, dma_addr 0x%0llx\n",
 	     __func__, chp->cq.cqid, chp, chp->cq.size,
 	     chp->cq.memsize,
 	     (unsigned long long) chp->cq.dma_addr);
--- linux-next-20100428.orig/drivers/infiniband/hw/cxgb4/qp.c
+++ linux-next-20100428/drivers/infiniband/hw/cxgb4/qp.c
@@ -107,8 +107,10 @@ static int create_qp(struct c4iw_rdev *r
 	if (!wq->rq.queue)
 		goto err6;
 	PDBG("%s sq base va 0x%p pa 0x%llx rq base va 0x%p pa 0x%llx\n",
-		__func__, wq->sq.queue, virt_to_phys(wq->sq.queue),
-		wq->rq.queue, virt_to_phys(wq->rq.queue));
+		__func__, wq->sq.queue,
+		(unsigned long long)virt_to_phys(wq->sq.queue),
+		wq->rq.queue,
+		(unsigned long long)virt_to_phys(wq->rq.queue));
 	memset(wq->rq.queue, 0, wq->rq.memsize);
 	pci_unmap_addr_set(&wq->rq, mapping, wq->rq.dma_addr);
 
@@ -1404,7 +1406,7 @@ struct ib_qp *c4iw_create_qp(struct ib_p
 		qhp->wq.rq.memsize = roundup(qhp->wq.rq.memsize, PAGE_SIZE);
 	}
 
-	PDBG("%s sqsize %u sqmemsize %lu rqsize %u rqmemsize %lu\n",
+	PDBG("%s sqsize %u sqmemsize %zu rqsize %u rqmemsize %zu\n",
 	     __func__, sqsize, qhp->wq.sq.memsize, rqsize, qhp->wq.rq.memsize);
 
 	ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq,
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux