[PATCH] powerpc/mpc512x: remove unnecessary #if

Brian Norris computersforpeace at gmail.com
Sat Oct 12 04:37:04 EST 2013


Hi,

I'm sorry, ignore this version. I left out a diff I meant to include.

On Fri, Oct 11, 2013 at 10:32 AM, 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>
> ---
> Based off of Gerhard Sittig's patch:
>   powerpc/mpc512x: silence build warning upon disabled DIU
>
> Compile-tested with CONFIG_FB_FSL_DIU=n

...

> @@ -42,6 +40,7 @@ struct platform_diu_data_ops {
>         void (*release_bootmem)(void);
>  };
>
> +#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
>  extern struct platform_diu_data_ops diu_ops;
>  #endif

The above hunk is incorrect. I will send v2.

Brian


More information about the Linuxppc-dev mailing list