[ofa-general] RE: [PATCH] rdma_cm: fix port type (fix bug 557)
Sean Hefty
mshefty at ichips.intel.com
Mon Jun 4 14:53:01 PDT 2007
> Possible. I was using the OFED build environment in sles10sp1, and without the
> patch next_port sometimes gets a negative value. This might be the reason it was
> difficult to reproduce this. Anyway, in order to cover all possibilities (such
> as C99), I think that next_port should be unsigned.
The problem makes sense to me now, and it explains why it wasn't easily
reproducible on other platforms. I'm not sure if we should convert
next_port to an unsigned value, or just ensure that it's not negative.
It's defined as an int since idr_get_new_above() expects an int. Do we
need an explicit cast when calling idr_get_new_above(), or how about
just casting next_port to unsigned when initializing it?
- Sean
More information about the general
mailing list