xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Jan Beulich <JBeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Cc: nd@arm.com, Stefano Stabellini <sstabellini@kernel.org>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 3/3] xen/include: Include xen/kconfig.h automatically
Date: Thu, 16 Feb 2017 12:01:33 +0000	[thread overview]
Message-ID: <9c75fbe4-215d-8d8e-0bd2-dcdd1ea8e481@arm.com> (raw)
In-Reply-To: <58A5969F020000780013AA81@prv-mh.provo.novell.com>

Hi Jan,

On 16/02/17 11:10, Jan Beulich wrote:
>>>> On 16.02.17 at 12:01, <andrew.cooper3@citrix.com> wrote:
>> On 16/02/17 10:48, Jan Beulich wrote:
>>>>>> On 16.02.17 at 11:40, <andrew.cooper3@citrix.com> wrote:
>>>> On 16/02/17 10:27, Jan Beulich wrote:
>>>>>>>> On 15.02.17 at 19:10, <andrew.cooper3@citrix.com> wrote:
>>>>>> generated/autoconf.h is already included automatically so CONFIG_* defines
>> are
>>>>>> avaialble.  However, the companion macros such as IS_ENABLED() are not
>>>>>> included.
>>>>>>
>>>>>> Include them uniformally everywhere.
>>>>> Well, if you really think this is a good idea, I'm not going to stand in
>>>>> the way, but why do we need this included everywhere? Many files
>>>>> don't even care about any CONFIG_*, and hence even less so about
>>>>> kconfig.h.
>>>> I am sorry, but you are complaining if I include it unilaterally, and
>>>> also complaining if I include kconfig.h in the specific location where I
>>>> need it.  These are mutually exclusive.
>>> I don't understand - when did I complain about its inclusion where
>>> it's needed? Iirc my complaint was about you adding the inclusion
>>> to */config.h without that header actually using the macros. My
>>> point really is that ideally each C file would get as little cruft as
>>> possible, while at present quite a number of header are being
>>> included by virtually every source file.
>>
>> Your complaint was specifically about me adding it to paging.h so I
>> could use IS_ENABLED() and not out-of-line a trivial function.
>
> Oh, that one: There my view was the other way around: No need
> to include yet another header in one which already gets included
> everywhere, when the new function could easily be out of line (as
> not being performance critical).
>
>> As for general availably, while I agree in general that we have far too
>> much stuff included by default (I have some plans for that), the
>> contents of kconfig.h is fairly small, and exactly the same category of
>> information as config.h
>>
>> I am looking to push for the use of IS_ENABLED() in preference to #ifdef
>> where possible, to reduce code-rot.
>
> Which makes sense, but won't affect said source files not using any
> CONFIG_* in the first place.

At least on ARM, we need CONFIG_* everywhere as the definitions of types 
and structure will change whether you are compiling for ARM64 or ARM.

I would expect the same for common code.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-02-16 12:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 18:10 [PATCH 1/3] xen/include: Remove explicit xen/config.h includes Andrew Cooper
2017-02-15 18:10 ` [PATCH 2/3] xen/include: Remove explicit asm/config.h includes Andrew Cooper
2017-02-16  9:09   ` Julien Grall
2017-02-15 18:10 ` [PATCH 3/3] xen/include: Include xen/kconfig.h automatically Andrew Cooper
2017-02-16  9:12   ` Julien Grall
2017-02-16 10:27   ` Jan Beulich
2017-02-16 10:40     ` Andrew Cooper
2017-02-16 10:48       ` Jan Beulich
2017-02-16 11:01         ` Andrew Cooper
2017-02-16 11:10           ` Jan Beulich
2017-02-16 11:59             ` Andrew Cooper
2017-02-16 12:38               ` Jan Beulich
2017-02-16 12:01             ` Julien Grall [this message]
2017-02-16  9:08 ` [PATCH 1/3] xen/include: Remove explicit xen/config.h includes Julien Grall
2017-02-16 10:25 ` Jan Beulich

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=9c75fbe4-215d-8d8e-0bd2-dcdd1ea8e481@arm.com \
    --to=julien.grall@arm.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.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).