public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH V2 0/3] Make omap3 board functions static
@ 2021-06-25 19:23 Adam Ford
  2021-06-25 19:23 ` [PATCH V2 1/3] arm: omap3: Make try_unlock_memory() static Adam Ford
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Adam Ford @ 2021-06-25 19:23 UTC (permalink / raw)
  To: u-boot; +Cc: lukma, pavel, pali, lokeshvutla, aford, Adam Ford

Several functions in omap3/board.c are only used in that file, and
two of them are only called when certain conditions are true in an
ifdef.  Rearange these functions to also be inside the ifdef and
make them static.

Before:

 text	   data	    bss	    dec	    hex	filename
  49998	   1057	   1888	  52943	   cecf	spl/u-boot-spl
 605972	  29244	  53020	 688236	  a806c	u-boot

After Patch 3/3:
   text	   data	    bss	    dec	    hex	filename
 605744	  29244	  52996	 687984	  a7f70	u-boot
  49918	   1057	   1888	  52863	   ce7f	spl/u-boot-spl

Adam Ford (3):
  arm: omap3: Make try_unlock_memory() static
  arm: omap3: Make secureworld_exit() static
  arm: omap3: Make secure_unlock_mem() static

 arch/arm/include/asm/arch-omap3/sys_proto.h |  2 --
 arch/arm/mach-omap2/omap3/board.c           | 21 +++++++++++----------
 2 files changed, 11 insertions(+), 12 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH V2 0/3] arm: omap3: Make functions static when possible
@ 2021-03-18 12:40 Adam Ford
  2021-03-18 12:40 ` [PATCH V2 1/3] arm: omap3: Make try_unlock_memory() static Adam Ford
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Ford @ 2021-03-18 12:40 UTC (permalink / raw)
  To: u-boot

A few functions are defined without being labeled as static
to that file.  In an effort to keep SPL as small as possible,
one function needs to be moved into an #ifdef so it's only enabled
when the calling function is available, and all of these can simply be
marked as static.

Before:
   text	   data	    bss	    dec	    hex	filename
  50988	   1053	   1888	  53929	   d2a9	spl/u-boot-spl

After:
   text	   data	    bss	    dec	    hex	filename
  50972	   1053	   1888	  53913	   d299	spl/u-boot-spl

While not significant, a few bytes can be very helpful when SPL is limited.

Adam Ford (3):
  arm: omap3: Make try_unlock_memory() static
  arm: omap3: Make secureworld_exit() static
  arm: omap3: Make secure_unlock_mem() static

 arch/arm/include/asm/arch-omap3/sys_proto.h |  2 --
 arch/arm/mach-omap2/omap3/board.c           | 21 +++++++++++----------
 2 files changed, 11 insertions(+), 12 deletions(-)

-- 
2.25.1

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

end of thread, other threads:[~2021-07-14  6:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-25 19:23 [PATCH V2 0/3] Make omap3 board functions static Adam Ford
2021-06-25 19:23 ` [PATCH V2 1/3] arm: omap3: Make try_unlock_memory() static Adam Ford
2021-06-25 19:23 ` [PATCH V2 2/3] arm: omap3: Make secureworld_exit() static Adam Ford
2021-06-25 19:23 ` [PATCH V2 3/3] arm: omap3: Make secure_unlock_mem() static Adam Ford
2021-07-14  6:52 ` [PATCH V2 0/3] Make omap3 board functions static Lokesh Vutla
  -- strict thread matches above, loose matches on Subject: below --
2021-03-18 12:40 [PATCH V2 0/3] arm: omap3: Make functions static when possible Adam Ford
2021-03-18 12:40 ` [PATCH V2 1/3] arm: omap3: Make try_unlock_memory() static Adam Ford

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