* [PATCH] infiniband: hw: amso1100: Fixed compile warning.
@ 2011-01-23 16:30 Ralf Thielow
2011-01-24 19:42 ` Bart Van Assche
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Thielow @ 2011-01-23 16:30 UTC (permalink / raw)
To: tom; +Cc: swise, linux-rdma, linux-kernel, Ralf Thielow
Fixed compile warning by use "unsigned long" instead of "u64"
on assign NULL to "c2_vq_req->reply_msg".
Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
---
drivers/infiniband/hw/amso1100/c2_vq.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/amso1100/c2_vq.c b/drivers/infiniband/hw/amso1100/c2_vq.c
index 9ce7819..807b730 100644
--- a/drivers/infiniband/hw/amso1100/c2_vq.c
+++ b/drivers/infiniband/hw/amso1100/c2_vq.c
@@ -107,7 +107,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
r = kmalloc(sizeof(struct c2_vq_req), GFP_KERNEL);
if (r) {
init_waitqueue_head(&r->wait_object);
- r->reply_msg = (u64) NULL;
+ r->reply_msg = (unsigned long) NULL;
r->event = 0;
r->cm_id = NULL;
r->qp = NULL;
@@ -123,7 +123,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
*/
void vq_req_free(struct c2_dev *c2dev, struct c2_vq_req *r)
{
- r->reply_msg = (u64) NULL;
+ r->reply_msg = (unsigned long) NULL;
if (atomic_dec_and_test(&r->refcnt)) {
kfree(r);
}
@@ -151,7 +151,7 @@ void vq_req_get(struct c2_dev *c2dev, struct c2_vq_req *r)
void vq_req_put(struct c2_dev *c2dev, struct c2_vq_req *r)
{
if (atomic_dec_and_test(&r->refcnt)) {
- if (r->reply_msg != (u64) NULL)
+ if (r->reply_msg != (unsigned long) NULL)
vq_repbuf_free(c2dev,
(void *) (unsigned long) r->reply_msg);
kfree(r);
--
1.7.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] infiniband: hw: amso1100: Fixed compile warning.
2011-01-23 16:30 [PATCH] infiniband: hw: amso1100: Fixed compile warning Ralf Thielow
@ 2011-01-24 19:42 ` Bart Van Assche
2011-01-28 23:41 ` Roland Dreier
0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2011-01-24 19:42 UTC (permalink / raw)
To: Ralf Thielow; +Cc: tom, swise, linux-rdma, linux-kernel
On Sun, Jan 23, 2011 at 5:30 PM, Ralf Thielow
<ralf.thielow@googlemail.com> wrote:
>
> Fixed compile warning by use "unsigned long" instead of "u64"
> on assign NULL to "c2_vq_req->reply_msg".
>
> Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
> ---
> drivers/infiniband/hw/amso1100/c2_vq.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/infiniband/hw/amso1100/c2_vq.c b/drivers/infiniband/hw/amso1100/c2_vq.c
> index 9ce7819..807b730 100644
> --- a/drivers/infiniband/hw/amso1100/c2_vq.c
> +++ b/drivers/infiniband/hw/amso1100/c2_vq.c
> @@ -107,7 +107,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
> r = kmalloc(sizeof(struct c2_vq_req), GFP_KERNEL);
> if (r) {
> init_waitqueue_head(&r->wait_object);
> - r->reply_msg = (u64) NULL;
> + r->reply_msg = (unsigned long) NULL;
> r->event = 0;
> r->cm_id = NULL;
> r->qp = NULL;
> @@ -123,7 +123,7 @@ struct c2_vq_req *vq_req_alloc(struct c2_dev *c2dev)
> */
> void vq_req_free(struct c2_dev *c2dev, struct c2_vq_req *r)
> {
> - r->reply_msg = (u64) NULL;
> + r->reply_msg = (unsigned long) NULL;
> if (atomic_dec_and_test(&r->refcnt)) {
> kfree(r);
> }
> @@ -151,7 +151,7 @@ void vq_req_get(struct c2_dev *c2dev, struct c2_vq_req *r)
> void vq_req_put(struct c2_dev *c2dev, struct c2_vq_req *r)
> {
> if (atomic_dec_and_test(&r->refcnt)) {
> - if (r->reply_msg != (u64) NULL)
> + if (r->reply_msg != (unsigned long) NULL)
> vq_repbuf_free(c2dev,
> (void *) (unsigned long) r->reply_msg);
> kfree(r);
Hello Ralf,
Have you considered using "0" instead of "(u64) NULL" or "(unsigned
long) NULL" ?
Bart.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] infiniband: hw: amso1100: Fixed compile warning.
2011-01-24 19:42 ` Bart Van Assche
@ 2011-01-28 23:41 ` Roland Dreier
0 siblings, 0 replies; 3+ messages in thread
From: Roland Dreier @ 2011-01-28 23:41 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Ralf Thielow, tom, swise, linux-rdma, linux-kernel
> Have you considered using "0" instead of "(u64) NULL" or "(unsigned
> long) NULL" ?
I applied a new version of the patch with 0 instead of (unsigned long)
NULL, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-28 23:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-23 16:30 [PATCH] infiniband: hw: amso1100: Fixed compile warning Ralf Thielow
2011-01-24 19:42 ` Bart Van Assche
2011-01-28 23:41 ` Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®