public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 06/17] Silicon/Socionext: fix unused variable error NorFlashFvb
@ 2020-11-27 11:31 Leif Lindholm
  2020-11-27 11:42 ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2020-11-27 11:31 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel

When building in NOOPT mode, SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
fails to build with -Werror=unused-but-set-variable due to the Instance
variable being set from the This pointer but never actually referenced.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---

Submitting as a single additional patch rather than a full v2.
(Patch 17 is Ard's new one increasing the FV size for DeveloperBoxMm.)

 Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
index 387789fb9782..48774e955faf 100644
--- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
+++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
@@ -209,9 +209,6 @@ FvbGetAttributes(
   )
 {
   EFI_FVB_ATTRIBUTES_2  FlashFvbAttributes;
-  NOR_FLASH_INSTANCE *Instance;
-
-  Instance = INSTANCE_FROM_FVB_THIS(This);
 
   FlashFvbAttributes = EFI_FVB2_READ_ENABLED_CAP | EFI_FVB2_READ_STATUS |
                        EFI_FVB2_WRITE_ENABLED_CAP | EFI_FVB2_WRITE_STATUS |
-- 
2.20.1


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

* Re: [PATCH edk2-platforms 06/17] Silicon/Socionext: fix unused variable error NorFlashFvb
  2020-11-27 11:31 [PATCH edk2-platforms 06/17] Silicon/Socionext: fix unused variable error NorFlashFvb Leif Lindholm
@ 2020-11-27 11:42 ` Ard Biesheuvel
  2020-11-27 12:55   ` Leif Lindholm
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2020-11-27 11:42 UTC (permalink / raw)
  To: Leif Lindholm, devel

On 11/27/20 12:31 PM, Leif Lindholm wrote:
> When building in NOOPT mode, SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> fails to build with -Werror=unused-but-set-variable due to the Instance
> variable being set from the This pointer but never actually referenced.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Leif Lindholm <leif@nuviainc.com>

Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

> ---
> 
> Submitting as a single additional patch rather than a full v2.
> (Patch 17 is Ard's new one increasing the FV size for DeveloperBoxMm.)
> 
>   Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> index 387789fb9782..48774e955faf 100644
> --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> @@ -209,9 +209,6 @@ FvbGetAttributes(
>     )
>   {
>     EFI_FVB_ATTRIBUTES_2  FlashFvbAttributes;
> -  NOR_FLASH_INSTANCE *Instance;
> -
> -  Instance = INSTANCE_FROM_FVB_THIS(This);
>   
>     FlashFvbAttributes = EFI_FVB2_READ_ENABLED_CAP | EFI_FVB2_READ_STATUS |
>                          EFI_FVB2_WRITE_ENABLED_CAP | EFI_FVB2_WRITE_STATUS |
> 


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

* Re: [PATCH edk2-platforms 06/17] Silicon/Socionext: fix unused variable error NorFlashFvb
  2020-11-27 11:42 ` Ard Biesheuvel
@ 2020-11-27 12:55   ` Leif Lindholm
  0 siblings, 0 replies; 3+ messages in thread
From: Leif Lindholm @ 2020-11-27 12:55 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: devel

On Fri, Nov 27, 2020 at 12:42:46 +0100, Ard Biesheuvel wrote:
> On 11/27/20 12:31 PM, Leif Lindholm wrote:
> > When building in NOOPT mode, SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> > fails to build with -Werror=unused-but-set-variable due to the Instance
> > variable being set from the This pointer but never actually referenced.
> > 
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Signed-off-by: Leif Lindholm <leif@nuviainc.com>
> 
> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

Thanks!

Series pushed as 734fed7db671..abd92d65cf3b, with FV size patch at the
end as previously mentioned.

/
    Leif

> > ---
> > 
> > Submitting as a single additional patch rather than a full v2.
> > (Patch 17 is Ard's new one increasing the FV size for DeveloperBoxMm.)
> > 
> >   Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c | 3 ---
> >   1 file changed, 3 deletions(-)
> > 
> > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> > index 387789fb9782..48774e955faf 100644
> > --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> > +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvb.c
> > @@ -209,9 +209,6 @@ FvbGetAttributes(
> >     )
> >   {
> >     EFI_FVB_ATTRIBUTES_2  FlashFvbAttributes;
> > -  NOR_FLASH_INSTANCE *Instance;
> > -
> > -  Instance = INSTANCE_FROM_FVB_THIS(This);
> >     FlashFvbAttributes = EFI_FVB2_READ_ENABLED_CAP | EFI_FVB2_READ_STATUS |
> >                          EFI_FVB2_WRITE_ENABLED_CAP | EFI_FVB2_WRITE_STATUS |
> > 
> 

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

end of thread, other threads:[~2020-11-27 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-27 11:31 [PATCH edk2-platforms 06/17] Silicon/Socionext: fix unused variable error NorFlashFvb Leif Lindholm
2020-11-27 11:42 ` Ard Biesheuvel
2020-11-27 12:55   ` Leif Lindholm

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