On Tue, 4 Dec 2018 at 18:19, Leif Lindholm <leif.lindh...@linaro.org> wrote:
>
> On Tue, Dec 04, 2018 at 05:40:14PM +0100, Ard Biesheuvel wrote:
> > > > +STATIC
> > > > +EFI_STATUS
> > > > +MvGpioGetValue (
> > > > +  IN     MARVELL_GPIO_PROTOCOL *This,
> > > > +  IN     UINTN ControllerIndex,
> > > > +  IN     UINTN GpioPin,
> > > > +  IN OUT BOOLEAN *Value
> > > > +  )
> > > > +{
> > > > +  UINTN BaseAddress;
> > > > +  EFI_STATUS Status;
> > > > +
> > > > +  Status = MvGpioValidate (ControllerIndex, GpioPin);
> > > > +  if (EFI_ERROR (Status)) {
> > > > +    DEBUG ((DEBUG_ERROR,
> > > > +      "%a: Fail to get value of pin #%d\n",
> > > > +      __FUNCTION__,
> > > > +      GpioPin));
> > > > +    return Status;
> > > > +  }
> > > > +
> > > > +  BaseAddress = 
> > > > mGpioInstance->Desc->SoC[ControllerIndex].GpioBaseAddress;
> > > > +
> > > > +  *Value = !!(MmioRead32 (BaseAddress + GPIO_DATA_IN_REG) & BIT 
> > > > (GpioPin));
> > >
> > > Please don't !!.
> > > If necessary, please shift.
> >
> > Or cast to (BOOLEAN)
>
> Would be ideal if BOOLEAN wasn't just a typedef for unsigned char :/
>

Ugh.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to