From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasu Dev Subject: Re: [Open-FCoE] [PATCH] fcoe: correct checking for bonding Date: Tue, 01 Mar 2011 10:09:47 -0800 Message-ID: <1299002987.7692.206.camel@vi2.jf.intel.com> References: <20110228133245.GB7096@psychotron.brq.redhat.com> <8433.1298913321@death> <4D6BE155.7050109@gmail.com> <20110301063710.GD2855@psychotron.redhat.com> <4D6D31BA.3000105@gmail.com> <1299002494.7692.202.camel@vi2.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1299002494.7692.202.camel@vi2.jf.intel.com> Sender: netdev-owner@vger.kernel.org To: Joe Eykholt Cc: linux-scsi@vger.kernel.org, Jiri Pirko , netdev@vger.kernel.org, Jay Vosburgh , James.Bottomley@HansenPartnership.com, devel@open-fcoe.org List-Id: linux-scsi@vger.kernel.org On Tue, 2011-03-01 at 10:01 -0800, Vasu Dev wrote: > On Tue, 2011-03-01 at 09:49 -0800, Joe Eykholt wrote: > > > > Otherwise I'd add some parens or I might code this as: > > > > if ((netdev->priv_flags & (IFF_BONDING | IFF_MASTER)) == > > (IFF_BONDING | IFF_MASTER)) > > or also skip == in code as:- > > if (netdev->priv_flags & (IFF_BONDING | IFF_MASTER)) > > Would least save few chars in source code. Never mind, you wanted to check both bits set instead checking only one of them, my mistake, anycase these are in different fields as another most recent response mentioned. Vasu