[openib-general] [PATCH] ib_cancel_mad API
Fab Tillier
ftillier at infiniconsys.com
Thu Sep 30 10:06:36 PDT 2004
> From: Sean Hefty [mailto:mshefty at ichips.intel.com]
> Sent: Thursday, September 30, 2004 9:55 AM
>
> On Wed, 29 Sep 2004 11:17:05 -0700
> Sean Hefty <mshefty at ichips.intel.com> wrote:
>
> > Here's a patch for discussion for an API and implementation that should
> allow canceling a sent MAD.
>
> Patch is similar to previous patch, but removes the return code from
> ib_cancel_mad.
>
...
> + if (mad_send_wr->wr_id == wr_id)
> + goto found;
> + }
> + spin_unlock_irqrestore(&mad_agent_priv->send_list_lock, flags);
> + return;
> +
> +found:
I find the "goto found" syntax ugly and confusing. It seems unnatural to
jump over the unlock like that.
Just my personal opinion - I'd rather see:
+ if (mad_send_wr->wr_id != wr_id)
+ continue;
But that's just me.
- Fab
More information about the general
mailing list