Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=42c059ea2b0aac5f961253ba81c1b464d181a600
Commit:     42c059ea2b0aac5f961253ba81c1b464d181a600
Parent:     614c3c85b5b4c3776439d464939c123cce679dee
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Tue Jun 12 10:52:02 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Jun 12 10:52:02 2007 -0700

    IB/mlx4: Fix warning in rounding up queue sizes
    
    Doing max(1, foo) where foo is u32 generates a warning, because 1 is a
    signed constant.  Fix this by using 1U instead.
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/mlx4/qp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 5c6d054..4c15fa3 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -207,8 +207,8 @@ static int set_rq_size(struct mlx4_ib_dev *dev, struct 
ib_qp_cap *cap,
                if (is_user && (!cap->max_recv_wr || !cap->max_recv_sge))
                        return -EINVAL;
 
-               qp->rq.max       = roundup_pow_of_two(max(1, cap->max_recv_wr));
-               qp->rq.max_gs    = roundup_pow_of_two(max(1, 
cap->max_recv_sge));
+               qp->rq.max       = roundup_pow_of_two(max(1U, 
cap->max_recv_wr));
+               qp->rq.max_gs    = roundup_pow_of_two(max(1U, 
cap->max_recv_sge));
                qp->rq.wqe_shift = ilog2(qp->rq.max_gs * sizeof (struct 
mlx4_wqe_data_seg));
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to