linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Burton <paulburton@kernel.org>
To: Lichao Liu <liulichao@loongson.cn>
Cc: chenhc@lemote.com, jiaxun.yang@flygoat.com, ralf@linux-mips.org,
	jhogan@kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS:Loongson64:Limit 8259.h by config
Date: Fri, 22 Nov 2019 10:36:21 -0800	[thread overview]
Message-ID: <20191122183621.67p7vuvfzhpoldna@lantea.localdomain> (raw)
In-Reply-To: <20191122135851.5145-1-liulichao@loongson.cn>

Hi Lichao,

On Fri, Nov 22, 2019 at 09:58:51PM +0800, Lichao Liu wrote:
> Not all platform config CONFIG_I8259, So Use the macro CONFIG_I8259
> to control whether to include the asm/i8259.h header file.

Generally including headers is harmless - it's quite common to include
headers which might or might not be used, and if nothing from the header
is used then its inclusion simply makes no difference. The compiler will
see the header contents & discard them, no big deal.

So can you describe why you want to add the #ifdef here? What's
problematic about including asm/i8259.h when CONFIG_I8259=n?

Thanks,
    Paul

> Signed-off-by: Lichao Liu <liulichao@loongson.cn>
> ---
>  arch/mips/loongson64/pm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/mips/loongson64/pm.c b/arch/mips/loongson64/pm.c
> index 7c8556f09781..08238a58107f 100644
> --- a/arch/mips/loongson64/pm.c
> +++ b/arch/mips/loongson64/pm.c
> @@ -9,7 +9,9 @@
>  #include <linux/interrupt.h>
>  #include <linux/pm.h>
>  
> +#ifdef CONFIG_I8259
>  #include <asm/i8259.h>
> +#endif
>  #include <asm/mipsregs.h>
>  
>  #include <loongson.h>
> -- 
> 2.17.1
> 

      reply	other threads:[~2019-11-22 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 13:58 [PATCH] MIPS:Loongson64:Limit 8259.h by config Lichao Liu
2019-11-22 18:36 ` Paul Burton [this message]

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=20191122183621.67p7vuvfzhpoldna@lantea.localdomain \
    --to=paulburton@kernel.org \
    --cc=chenhc@lemote.com \
    --cc=jhogan@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=liulichao@loongson.cn \
    --cc=ralf@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;
as well as URLs for NNTP newsgroup(s).