lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Apr 2010 10:33:56 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Roland Dreier <rolandd@...co.com>,
	Sean Hefty <sean.hefty@...el.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>
Cc:	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] infiniband: fix cxgb4 printk format warnings

From: Randy Dunlap <randy.dunlap@...cle.com>

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@...cle.com>
---
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ