Re: [PATCH 05/16] ehca: InfiniBand query and multicastfunctionality

From: Stephen Hemminger
Date: Thu Apr 27 2006 - 12:54:56 EST


On Thu, 27 Apr 2006 12:48:29 +0200
Heiko J Schick <schihei@xxxxxxxxxx> wrote:

> Signed-off-by: Heiko J Schick <schickhj@xxxxxxxxxx>
>
>
> ehca_hca.c | 286 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ehca_mcast.c | 198 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 484 insertions(+)
>
>
> +#define TO_MAX_INT(dest, src) \
> + if (src >= INT_MAX) \
> + dest = INT_MAX; \
> + else \
> + dest = src
> +

This is doubly ugly, replace
TO_MAX_INT(props->max_qp, (rblock->max_qp - rblock->cur_qp);
with
props->max_qp = min(rblock->max_qp - rblock->cur_qp, INT_MAX);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/