All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jubin John <jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	Jim Snow <jim.m.snow-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Brendan Cunningham
	<brendan.cunningham-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v2] staging/rdma/hfi1: check for ARMED->ACTIVE transition in receive interrupt
Date: Tue, 5 Jan 2016 13:48:17 -0500	[thread overview]
Message-ID: <20160105184814.GA9152@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <20160104202346.GC18146-2ukJVAZIZ/Y@public.gmane.org>

On Mon, Jan 04, 2016 at 10:23:46PM +0200, Leon Romanovsky wrote:
> On Mon, Jan 04, 2016 at 11:21:19AM -0500, Jubin John wrote:
> > From: Jim Snow <jim.m.snow-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > 
> >  		} 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;

I don't think there is an advantage to the double if, so I will change
it to the single if in v3.

> 
> >  			last = process_rcv_packet(&packet, thread);
> >  		}
> >  
> > @@ -984,6 +1020,42 @@ bail:
> >  }
> >  
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2016-01-05 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 16:21 [PATCH v2] staging/rdma/hfi1: check for ARMED->ACTIVE transition in receive interrupt Jubin John
     [not found] ` <1451924479-26205-1-git-send-email-jubin.john-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-01-04 20:23   ` Leon Romanovsky
     [not found]     ` <20160104202346.GC18146-2ukJVAZIZ/Y@public.gmane.org>
2016-01-05 18:48       ` Jubin John [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160105184814.GA9152@phlsvsds.ph.intel.com \
    --to=jubin.john-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=brendan.cunningham-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=jim.m.snow-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.