Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: <linux-mips@linux-mips.org>
Subject: Re: [PATCH] MIPS: IP22/IP32: Add missing ifdefs to Platform files
Date: Wed, 8 Oct 2014 11:34:26 +0100	[thread overview]
Message-ID: <54351332.9020309@imgtec.com> (raw)
In-Reply-To: <543496C6.7000005@gentoo.org>

On 10/08/2014 02:43 AM, Joshua Kinard wrote:
> In arch/mips/sgi-ip22/Platform and arch/mips/sgi-ip32/Platform, ifdefs for
> CONFIG_SGI_IP22 and CONFIG_SGI_IP32 are missing, which can cause the
> definitions for these platforms to get included in builds for other platforms.
>  This patch adds these missing ifdefs, which matches IP27's Platform file.
> 
> Signed-off-by: Joshua Kinard <kumba@gentoo.org>
> ---
>  arch/mips/sgi-ip22/Platform |    8 +++++---
>  arch/mips/sgi-ip32/Platform |    9 ++++++---
>  2 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
> index b7a4b7e..5fa3c7a 100644
> --- a/arch/mips/sgi-ip22/Platform
> +++ b/arch/mips/sgi-ip22/Platform
> @@ -7,7 +7,8 @@
>  # current variable will break so for 64-bit kernels we have to raise the start
>  # address by 8kb.
>  #
> -platform-$(CONFIG_SGI_IP22)		+= sgi-ip22/
> +ifdef CONFIG_SGI_IP22
> +platform-$(CONFIG_SGI_IP22)	+= sgi-ip22/
>  cflags-$(CONFIG_SGI_IP22)	+= -I$(srctree)/arch/mips/include/asm/mach-ip22
>  ifdef CONFIG_32BIT
>  load-$(CONFIG_SGI_IP22)		+= 0xffffffff88002000
> @@ -15,6 +16,7 @@ endif
>  ifdef CONFIG_64BIT
>  load-$(CONFIG_SGI_IP22)		+= 0xffffffff88004000
>  endif
> +endif
>  

I could be wrong but isn't that functionally the same thing? As in, if
CONFIG_SGI_IP22 is not enabled, the sgi-ip22 etc are not included.
That's the same thing as the original code was doing no? Why do you need
to hide all the $FOO-$(CONFIG_SGI_IP22) in a separate #ifdef block. What
problem are you trying to solve?

-- 
markos

WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: IP22/IP32: Add missing ifdefs to Platform files
Date: Wed, 8 Oct 2014 11:34:26 +0100	[thread overview]
Message-ID: <54351332.9020309@imgtec.com> (raw)
Message-ID: <20141008103426.AtGYuuJwhYXjwpG0z_27eQnqhFMhjCj8C_rSB4YfkDM@z> (raw)
In-Reply-To: <543496C6.7000005@gentoo.org>

On 10/08/2014 02:43 AM, Joshua Kinard wrote:
> In arch/mips/sgi-ip22/Platform and arch/mips/sgi-ip32/Platform, ifdefs for
> CONFIG_SGI_IP22 and CONFIG_SGI_IP32 are missing, which can cause the
> definitions for these platforms to get included in builds for other platforms.
>  This patch adds these missing ifdefs, which matches IP27's Platform file.
> 
> Signed-off-by: Joshua Kinard <kumba@gentoo.org>
> ---
>  arch/mips/sgi-ip22/Platform |    8 +++++---
>  arch/mips/sgi-ip32/Platform |    9 ++++++---
>  2 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
> index b7a4b7e..5fa3c7a 100644
> --- a/arch/mips/sgi-ip22/Platform
> +++ b/arch/mips/sgi-ip22/Platform
> @@ -7,7 +7,8 @@
>  # current variable will break so for 64-bit kernels we have to raise the start
>  # address by 8kb.
>  #
> -platform-$(CONFIG_SGI_IP22)		+= sgi-ip22/
> +ifdef CONFIG_SGI_IP22
> +platform-$(CONFIG_SGI_IP22)	+= sgi-ip22/
>  cflags-$(CONFIG_SGI_IP22)	+= -I$(srctree)/arch/mips/include/asm/mach-ip22
>  ifdef CONFIG_32BIT
>  load-$(CONFIG_SGI_IP22)		+= 0xffffffff88002000
> @@ -15,6 +16,7 @@ endif
>  ifdef CONFIG_64BIT
>  load-$(CONFIG_SGI_IP22)		+= 0xffffffff88004000
>  endif
> +endif
>  

I could be wrong but isn't that functionally the same thing? As in, if
CONFIG_SGI_IP22 is not enabled, the sgi-ip22 etc are not included.
That's the same thing as the original code was doing no? Why do you need
to hide all the $FOO-$(CONFIG_SGI_IP22) in a separate #ifdef block. What
problem are you trying to solve?

-- 
markos

  reply	other threads:[~2014-10-08 10:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08  1:43 [PATCH] MIPS: IP22/IP32: Add missing ifdefs to Platform files Joshua Kinard
2014-10-08 10:34 ` Markos Chandras [this message]
2014-10-08 10:34   ` Markos Chandras
2014-10-08 11:30   ` Joshua Kinard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54351332.9020309@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox