> -----Original Message----- > From: Leif Lindholm [mailto:[email protected]] > Sent: Wednesday, April 18, 2018 11:45 PM > To: Meenakshi Aggarwal <[email protected]> > Cc: [email protected]; [email protected]; Udit Kumar > <[email protected]>; Varun Sethi <[email protected]> > Subject: Re: [PATCH edk2-platforms 03/39] SocLib : Add support for > initialization of peripherals > > On Wed, Apr 18, 2018 at 04:38:22PM +0000, Meenakshi Aggarwal wrote: > > > > + > > > > +/* > > > > + * Returns the bit mask for a bit index from 0 to 31 > > > > + */ > > > > +#define BIT(_BitIndex) (0x1u << (_BitIndex)) > > > > > > I don't see these being used for anything other than setting up BIT1 > > > BIT2 BIT3 and so on. We already have those in Base.h. > > > > > In Base.h, we have BIT1, BIT2 defined, here the requirement is to > > get set bit on basis of bit number, bit is not known in advance. > > Ah, I missed the uses in SerDes.c and saw only the ones in UsbHcd.h > (which could use the Base.h defines). > > But does it really simplify anything in SerDes.c? > > *SerDesPrtclMap |= BIT (LanePrtcl); > > is no clearer to me than > > *SerDesPrtclMap |= (1u << LanePrtcl); > This can also be used.
> Best Regards, > > Leif _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

