[ewg] [PATCH 11/14] nes: OpenFabrics kernel verbs
Roland Dreier
rdreier at cisco.com
Wed Aug 8 13:10:14 PDT 2007
> +static struct ib_mw *nes_alloc_mw(struct ib_pd *ibpd) {
> + get_random_bytes(&next_stag_index, sizeof(next_stag_index));
Could this use up a lot of entropy? Is random32() sufficient?
> + stag_key = (u8)next_stag_index;
I don't think this cast is needed.
> + if (ret) {
> + return (ERR_PTR(ret));
> + }
Don't need braces for one-line blocks.
> + if (NULL == cqp_request) {
It's more idiomatic to write "if (!cqp_request) {"
More information about the ewg
mailing list