public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ArmPkg: fix compilation error in ArmDmaLib
@ 2016-12-01 16:45 Leif Lindholm
  2016-12-01 16:46 ` Sudeep Holla
  2016-12-01 17:00 ` Ard Biesheuvel
  0 siblings, 2 replies; 4+ messages in thread
From: Leif Lindholm @ 2016-12-01 16:45 UTC (permalink / raw)
  To: edk2-devel; +Cc: Sudeep Holla, Ard Biesheuvel, Andrew Fish, Michael D Kinney

Commit 0a99a65d2c8a ("fix incorrect device address of double buffer")
retained an explicit cast on the variable "Buffer" which became
incorrect with the other changes, leading to compilation failures
with some toolchains. Drop the cast.

Contributed-under: TianoCore Contribution Agreement 1.0
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---

Mike, Andrew - since Ard is on holiday and the fix is trivial,
could either of you give me a Reviewed-by: on this one?

 ArmPkg/Library/ArmDmaLib/ArmDmaLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c b/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
index acc106b..f4ee9e4 100644
--- a/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
+++ b/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
@@ -142,7 +142,7 @@ DmaMap (
         CopyMem (Buffer, HostAddress, *NumberOfBytes);
       }
 
-      *DeviceAddress = HostToDeviceAddress (ConvertToPhysicalAddress ((UINTN)Buffer));
+      *DeviceAddress = HostToDeviceAddress (ConvertToPhysicalAddress (Buffer));
       Map->BufferAddress = Buffer;
     } else {
       Map->DoubleBuffer  = FALSE;
-- 
2.10.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ArmPkg: fix compilation error in ArmDmaLib
  2016-12-01 16:45 [PATCH] ArmPkg: fix compilation error in ArmDmaLib Leif Lindholm
@ 2016-12-01 16:46 ` Sudeep Holla
  2016-12-01 17:00 ` Ard Biesheuvel
  1 sibling, 0 replies; 4+ messages in thread
From: Sudeep Holla @ 2016-12-01 16:46 UTC (permalink / raw)
  To: Leif Lindholm, edk2-devel
  Cc: Sudeep Holla, Ard Biesheuvel, Andrew Fish, Michael D Kinney



On 01/12/16 16:45, Leif Lindholm wrote:
> Commit 0a99a65d2c8a ("fix incorrect device address of double buffer")
> retained an explicit cast on the variable "Buffer" which became
> incorrect with the other changes, leading to compilation failures
> with some toolchains. Drop the cast.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Reported-by: Sudeep Holla <sudeep.holla@arm.com>

It fixes the build for me.

Tested-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ArmPkg: fix compilation error in ArmDmaLib
  2016-12-01 16:45 [PATCH] ArmPkg: fix compilation error in ArmDmaLib Leif Lindholm
  2016-12-01 16:46 ` Sudeep Holla
@ 2016-12-01 17:00 ` Ard Biesheuvel
  2016-12-01 17:07   ` Leif Lindholm
  1 sibling, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2016-12-01 17:00 UTC (permalink / raw)
  To: Leif Lindholm
  Cc: edk2-devel@lists.01.org, Sudeep Holla, Andrew Fish,
	Michael D Kinney

On 1 December 2016 at 16:45, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> Commit 0a99a65d2c8a ("fix incorrect device address of double buffer")
> retained an explicit cast on the variable "Buffer" which became
> incorrect with the other changes, leading to compilation failures
> with some toolchains. Drop the cast.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Reported-by: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>
> Mike, Andrew - since Ard is on holiday and the fix is trivial,
> could either of you give me a Reviewed-by: on this one?
>
>  ArmPkg/Library/ArmDmaLib/ArmDmaLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c b/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
> index acc106b..f4ee9e4 100644
> --- a/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
> +++ b/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
> @@ -142,7 +142,7 @@ DmaMap (
>          CopyMem (Buffer, HostAddress, *NumberOfBytes);
>        }
>
> -      *DeviceAddress = HostToDeviceAddress (ConvertToPhysicalAddress ((UINTN)Buffer));
> +      *DeviceAddress = HostToDeviceAddress (ConvertToPhysicalAddress (Buffer));
>        Map->BufferAddress = Buffer;
>      } else {
>        Map->DoubleBuffer  = FALSE;
> --
> 2.10.2
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ArmPkg: fix compilation error in ArmDmaLib
  2016-12-01 17:00 ` Ard Biesheuvel
@ 2016-12-01 17:07   ` Leif Lindholm
  0 siblings, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2016-12-01 17:07 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: edk2-devel@lists.01.org, Sudeep Holla, Andrew Fish,
	Michael D Kinney

On Thu, Dec 01, 2016 at 05:00:19PM +0000, Ard Biesheuvel wrote:
> On 1 December 2016 at 16:45, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > Commit 0a99a65d2c8a ("fix incorrect device address of double buffer")
> > retained an explicit cast on the variable "Buffer" which became
> > incorrect with the other changes, leading to compilation failures
> > with some toolchains. Drop the cast.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Reported-by: Sudeep Holla <sudeep.holla@arm.com>
> > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> 
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Get back on holiday!

Thanks :)

Pushed as 018c3c0, thanks.

/
    Leif

> > ---
> >
> > Mike, Andrew - since Ard is on holiday and the fix is trivial,
> > could either of you give me a Reviewed-by: on this one?
> >
> >  ArmPkg/Library/ArmDmaLib/ArmDmaLib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c b/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
> > index acc106b..f4ee9e4 100644
> > --- a/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
> > +++ b/ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
> > @@ -142,7 +142,7 @@ DmaMap (
> >          CopyMem (Buffer, HostAddress, *NumberOfBytes);
> >        }
> >
> > -      *DeviceAddress = HostToDeviceAddress (ConvertToPhysicalAddress ((UINTN)Buffer));
> > +      *DeviceAddress = HostToDeviceAddress (ConvertToPhysicalAddress (Buffer));
> >        Map->BufferAddress = Buffer;
> >      } else {
> >        Map->DoubleBuffer  = FALSE;
> > --
> > 2.10.2
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-01 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-01 16:45 [PATCH] ArmPkg: fix compilation error in ArmDmaLib Leif Lindholm
2016-12-01 16:46 ` Sudeep Holla
2016-12-01 17:00 ` Ard Biesheuvel
2016-12-01 17:07   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox