Subject: Re: [ewg] [PATCH 11/14] nes: OpenFabrics kernel verbs

From: Roland Dreier <[email-masked]>
Date: Wed, 08 Aug 2007 13:10:14 -0700

> +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) {"