All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: omap3: Make try_unlock_memory() static
@ 2021-03-07  3:53 Adam Ford
  2021-03-15  6:43 ` Lokesh Vutla
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-03-07  3:53 UTC (permalink / raw)
  To: u-boot

try_unlock_memory() is only used in one file, so make it static
in that file and remove it from the sys_proto header file. This
may help with some further optimization in the future.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 32ac033515..656f848a73 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -60,7 +60,6 @@ u32 is_running_in_sram(void);
 u32 is_running_in_flash(void);
 u32 get_device_type(void);
 void secureworld_exit(void);
-void try_unlock_memory(void);
 u32 get_boot_type(void);
 void invalidate_dcache(u32);
 u32 wait_on_value(u32, u32, void *, u32);
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 029bd54595..c621177580 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -145,7 +145,7 @@ void secureworld_exit(void)
  * Description: If chip is GP/EMU(special) type, unlock the SRAM for
  *              general use.
  *****************************************************************************/
-void try_unlock_memory(void)
+static void try_unlock_memory(void)
 {
 	int mode;
 	int in_sdram = is_running_in_sdram();
-- 
2.25.1

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

* [PATCH] arm: omap3: Make try_unlock_memory() static
  2021-03-07  3:53 [PATCH] arm: omap3: Make try_unlock_memory() static Adam Ford
@ 2021-03-15  6:43 ` Lokesh Vutla
  2021-03-16 17:18   ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Lokesh Vutla @ 2021-03-15  6:43 UTC (permalink / raw)
  To: u-boot



On 07/03/21 9:23 am, Adam Ford wrote:
> try_unlock_memory() is only used in one file, so make it static
> in that file and remove it from the sys_proto header file. This
> may help with some further optimization in the future.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

one of omap3 board is failing to build. Can you take a look?

https://source.denx.de/u-boot/custodians/u-boot-ti/-/jobs/237886

Thanks and regards,
Lokesh

> 
> diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
> index 32ac033515..656f848a73 100644
> --- a/arch/arm/include/asm/arch-omap3/sys_proto.h
> +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
> @@ -60,7 +60,6 @@ u32 is_running_in_sram(void);
>  u32 is_running_in_flash(void);
>  u32 get_device_type(void);
>  void secureworld_exit(void);
> -void try_unlock_memory(void);
>  u32 get_boot_type(void);
>  void invalidate_dcache(u32);
>  u32 wait_on_value(u32, u32, void *, u32);
> diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
> index 029bd54595..c621177580 100644
> --- a/arch/arm/mach-omap2/omap3/board.c
> +++ b/arch/arm/mach-omap2/omap3/board.c
> @@ -145,7 +145,7 @@ void secureworld_exit(void)
>   * Description: If chip is GP/EMU(special) type, unlock the SRAM for
>   *              general use.
>   *****************************************************************************/
> -void try_unlock_memory(void)
> +static void try_unlock_memory(void)
>  {
>  	int mode;
>  	int in_sdram = is_running_in_sdram();
> 

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

* [PATCH] arm: omap3: Make try_unlock_memory() static
  2021-03-15  6:43 ` Lokesh Vutla
@ 2021-03-16 17:18   ` Adam Ford
  2021-03-16 17:42     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-03-16 17:18 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 15, 2021 at 1:43 AM Lokesh Vutla <lokeshvutla@ti.com> wrote:
>
>
>
> On 07/03/21 9:23 am, Adam Ford wrote:
> > try_unlock_memory() is only used in one file, so make it static
> > in that file and remove it from the sys_proto header file. This
> > may help with some further optimization in the future.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> one of omap3 board is failing to build. Can you take a look?
>
> https://source.denx.de/u-boot/custodians/u-boot-ti/-/jobs/237886
>

Question on preference...Would you prefer I move the unused function
into the #ifdef area, or should I just mark the function as
__maybe_unused?   I am not a fan of #ifdef, but I can move the
function there that is your preference.

adam

> Thanks and regards,
> Lokesh
>
> >
> > diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
> > index 32ac033515..656f848a73 100644
> > --- a/arch/arm/include/asm/arch-omap3/sys_proto.h
> > +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
> > @@ -60,7 +60,6 @@ u32 is_running_in_sram(void);
> >  u32 is_running_in_flash(void);
> >  u32 get_device_type(void);
> >  void secureworld_exit(void);
> > -void try_unlock_memory(void);
> >  u32 get_boot_type(void);
> >  void invalidate_dcache(u32);
> >  u32 wait_on_value(u32, u32, void *, u32);
> > diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
> > index 029bd54595..c621177580 100644
> > --- a/arch/arm/mach-omap2/omap3/board.c
> > +++ b/arch/arm/mach-omap2/omap3/board.c
> > @@ -145,7 +145,7 @@ void secureworld_exit(void)
> >   * Description: If chip is GP/EMU(special) type, unlock the SRAM for
> >   *              general use.
> >   *****************************************************************************/
> > -void try_unlock_memory(void)
> > +static void try_unlock_memory(void)
> >  {
> >       int mode;
> >       int in_sdram = is_running_in_sdram();
> >

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

* [PATCH] arm: omap3: Make try_unlock_memory() static
  2021-03-16 17:18   ` Adam Ford
@ 2021-03-16 17:42     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2021-03-16 17:42 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 16, 2021 at 12:18:05PM -0500, Adam Ford wrote:
> On Mon, Mar 15, 2021 at 1:43 AM Lokesh Vutla <lokeshvutla@ti.com> wrote:
> >
> >
> >
> > On 07/03/21 9:23 am, Adam Ford wrote:
> > > try_unlock_memory() is only used in one file, so make it static
> > > in that file and remove it from the sys_proto header file. This
> > > may help with some further optimization in the future.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > one of omap3 board is failing to build. Can you take a look?
> >
> > https://source.denx.de/u-boot/custodians/u-boot-ti/-/jobs/237886
> >
> 
> Question on preference...Would you prefer I move the unused function
> into the #ifdef area, or should I just mark the function as
> __maybe_unused?   I am not a fan of #ifdef, but I can move the
> function there that is your preference.

If there's already an #ifdef we should restructure the code to live
there, yes.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210316/ce9f2993/attachment.sig>

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

end of thread, other threads:[~2021-03-16 17:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07  3:53 [PATCH] arm: omap3: Make try_unlock_memory() static Adam Ford
2021-03-15  6:43 ` Lokesh Vutla
2021-03-16 17:18   ` Adam Ford
2021-03-16 17:42     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.