lkml.org 
[lkml]   [2006]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 05/16] ehca: InfiniBand query and multicast functionality
Date
On Thu, 27 Apr 2006 12:48:29 +0200
Heiko J Schick <schihei@de.ibm.com> wrote:

> Signed-off-by: Heiko J Schick <schickhj@de.ibm.com>
>
>
> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-27 18:56    [W:0.040 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site