[openib-general] [PATCH] If addr_handler() got error, do not set state as OK

Sean Hefty mshefty at ichips.intel.com
Tue Oct 17 10:03:41 PDT 2006


Krishna Kumar wrote:
> diff -ruNp org/drivers/infiniband/core/cma.c new/drivers/infiniband/core/cma.c
> --- org/drivers/infiniband/core/cma.c	2006-10-10 15:45:27.000000000 +0530
> +++ new/drivers/infiniband/core/cma.c	2006-10-10 15:59:53.000000000 +0530
> @@ -1515,6 +1515,8 @@ static void addr_handler(int status, str
>  {
>  	struct rdma_id_private *id_priv = context;
>  	enum rdma_cm_event_type event;
> +	int did_comp_exch = 0;
> +	int destroy = 0;

As a general comment, I really don't think that we need to be overly concerned 
about optimizing error handling at the expense of code readability.

Can you rework this patch without adding in extra flags to indicate what has or 
has not been executed?

Thanks,
- Sean




More information about the general mailing list