Re: [PATCH v2] staging/rdma/hfi1: check for ARMED->ACTIVE transition in receive interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 04, 2016 at 11:21:19AM -0500, Jubin John wrote:
> From: Jim Snow <jim.m.snow@xxxxxxxxx>
> 
>  		} else {
> +			/* Auto activate link on non-SC15 packet receive */
> +			if (unlikely(rcd->ppd->host_link_state ==
> +				     HLS_UP_ARMED))
> +				if (set_armed_to_active(rcd, packet, dd))
> +					goto bail;

What is the advantage of double "if" over one "if"?
Something like that
+ if (unlikely(rcd->ppd->host_link_state == HLS_UP_ARMED) && (set_armed_to_active(rcd, packet, dd))
+		goto bail;

>  			last = process_rcv_packet(&packet, thread);
>  		}
>  
> @@ -984,6 +1020,42 @@ bail:
>  }
>  
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux