From: Randy Dunlap <randy.dunlap@oracle•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
Roland Dreier <rolandd@cisco•com>,
Sean Hefty <sean.hefty@intel•com>,
Hal Rosenstock <hal.rosenstock@gmail•com>
Cc: linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>
Subject: [PATCH -next] infiniband: fix cxgb4 printk format warnings
Date: Wed, 28 Apr 2010 10:33:56 -0700 [thread overview]
Message-ID: <20100428103356.931ba48c.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20100428164341.cee2911a.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle•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@oracle•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,
next prev parent reply other threads:[~2010-04-28 17:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 6:43 linux-next: Tree for April 28 Stephen Rothwell
2010-04-28 15:56 ` linux-next: Tree for April 28 (logfs) Randy Dunlap
2010-05-05 16:20 ` Randy Dunlap
2010-05-05 20:35 ` Jörn Engel
2010-05-09 6:20 ` Ingo Molnar
2010-05-17 3:48 ` linux-next -> 2.6.34: " Randy Dunlap
2010-05-17 19:31 ` Jörn Engel
2010-05-18 0:40 ` Ingo Molnar
2010-05-17 19:25 ` linux-next: " Jörn Engel
2010-04-28 17:33 ` Randy Dunlap [this message]
2010-05-05 18:57 ` [PATCH -next] infiniband: fix cxgb4 printk format warnings Roland Dreier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100428103356.931ba48c.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle$(echo .)com \
--cc=hal.rosenstock@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=rolandd@cisco$(echo .)com \
--cc=sean.hefty@intel$(echo .)com \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox