lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CF9D1877D81D214CB0CA0669EFAE020C74C34365@CMEXMB1.ad.emulex.com>
Date:	Mon, 16 Feb 2015 12:55:26 +0000
From:	Sathya Perla <Sathya.Perla@...lex.Com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next 2/9] be2net: replace (1 << x) with BIT(x)



> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@...entembedded.com]
> 
> Hello.
> 
> On 2/6/2015 4:18 PM, Sathya Perla wrote:
> 
> > From: Vasundhara Volam <vasundhara.volam@...lex.com>
> 
> > BIT(x) is the preffered usage.
> 
>     Preferred.
:-) As this is a harmless spelling mistake only in the changelog,
I'll not bother sending a new patch for this!

> 
> [...]
> 
> > diff --git a/drivers/net/ethernet/emulex/benet/be.h
> b/drivers/net/ethernet/emulex/benet/be.h
> > index 3b1d59d..9869556 100644
> > --- a/drivers/net/ethernet/emulex/benet/be.h
> > +++ b/drivers/net/ethernet/emulex/benet/be.h
> > @@ -361,15 +361,15 @@ enum vf_state {
> >   	ASSIGNED = 1
> >   };
> >
> > -#define BE_FLAGS_LINK_STATUS_INIT		1
> > -#define BE_FLAGS_SRIOV_ENABLED			(1 << 2)
> > -#define BE_FLAGS_WORKER_SCHEDULED		(1 << 3)
> > -#define BE_FLAGS_VLAN_PROMISC			(1 << 4)
> > -#define BE_FLAGS_MCAST_PROMISC			(1 << 5)
> > -#define BE_FLAGS_NAPI_ENABLED			(1 << 9)
> > -#define BE_FLAGS_QNQ_ASYNC_EVT_RCVD		(1 << 11)
> > -#define BE_FLAGS_VXLAN_OFFLOADS			(1 << 12)
> > -#define BE_FLAGS_SETUP_DONE			(1 << 13)
> > +#define BE_FLAGS_LINK_STATUS_INIT		BIT(1)
> 
>     Not BIT(0)?

Huh, this was not intentional. I'll remember to use bit-0 the next time
we introduce a new bit!

> 
> > +#define BE_FLAGS_SRIOV_ENABLED			BIT(2)
> > +#define BE_FLAGS_WORKER_SCHEDULED		BIT(3)
> > +#define BE_FLAGS_VLAN_PROMISC			BIT(4)
> > +#define BE_FLAGS_MCAST_PROMISC			BIT(5)
> > +#define BE_FLAGS_NAPI_ENABLED			BIT(6)
> > +#define BE_FLAGS_QNQ_ASYNC_EVT_RCVD		BIT(7)
> > +#define BE_FLAGS_VXLAN_OFFLOADS			BIT(8)
> > +#define BE_FLAGS_SETUP_DONE			BIT(9)
> 
>     So, you decided to renumber the bits?

Yes, some holes in the bit map were removed.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ