lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdYHKR+oOD36RCUMobEwJj_Y9WDHTUY+UaHAx0YegMhXyg@mail.gmail.com>
Date:	Wed, 2 May 2012 01:26:12 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	linux-kernel@...r.kernel.org, grant.likely@...retlab.ca,
	linus.walleij@...ricsson.com, patches@...aro.org
Subject: Re: [PATCH] gpio/exynos: Fix compiler warnings when non-exynos
 machines are selected

On Mon, Apr 30, 2012 at 8:52 AM, Sachin Kamat <sachin.kamat@...aro.org> wrote:

> +#if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_ARCH_EXYNOS5)
> +#endif
> -static struct samsung_gpio_chip exynos4_gpios_1[] = {
>  #ifdef CONFIG_ARCH_EXYNOS4
> +static struct samsung_gpio_chip exynos4_gpios_1[] = {
> -#endif
> +#endif
> -static struct samsung_gpio_chip exynos4_gpios_2[] = {
>  #ifdef CONFIG_ARCH_EXYNOS4
> +static struct samsung_gpio_chip exynos4_gpios_2[] = {
> -#endif
> +#endif
> -static struct samsung_gpio_chip exynos4_gpios_3[] = {
>  #ifdef CONFIG_ARCH_EXYNOS4
> +static struct samsung_gpio_chip exynos4_gpios_3[] = {
> -#endif
> +#endif
>  #ifdef CONFIG_ARCH_EXYNOS5
> +#if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250)
> +#endif
> +#if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250)
> +#endif

We really want to get rid of this kind of stuff from all drivers, #ifdefs are
declared ugly already in Documentation/CodingStyle.

Any chance you could solve this problem by reworking the driver to
pass some flag in platform data tell which exynos it's for
and jist adapt at runtime instead of the compile-time quirkiness?

Besides looking better, it helps us to get to a single zImage for the
exynoses too..

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ