[PATCH v2] powerpc/mpc512x: remove unnecessary #if
Anatolij Gustschin
agust at denx.de
Thu Oct 31 09:12:10 EST 2013
On Fri, 11 Oct 2013 10:37:38 -0700
Brian Norris <computersforpeace at gmail.com> wrote:
> Several functions are only ever referenced locally, so make them static.
> Of those functions, many of them are protected by an #if. However, the
> code which can compile fine in either case.
>
> Now that (1) the unneeded code is marked 'static' and (2) the code is
> only used under a C 'if (IS_ENABLED(CONFIG_FB_FSL_DIU))', the compiler
> can automatically remove the unneeded code, and we don't need the #if or
> the empty stub functions.
>
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> ---
> v2: left out a diff I was holding locally (to remove an #if/#endif
> completely). Sorry for the noise.
>
> Based off of Gerhard Sittig's patch:
> powerpc/mpc512x: silence build warning upon disabled DIU
>
> Compile-tested with CONFIG_FB_FSL_DIU=n
>
> arch/powerpc/platforms/512x/mpc512x_shared.c | 21 +++++++--------------
> arch/powerpc/sysdev/fsl_soc.h | 3 ---
> 2 files changed, 7 insertions(+), 17 deletions(-)
Applied, thanks!
Anatolij
More information about the Linuxppc-dev
mailing list