From: George Dunlap <george.dunlap@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Paul Durrant <paul.durrant@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Ian Jackson <Ian.Jackson@citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Daniel de Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH 5/7] public / x86: introduce __HYPERCALL_iommu_op
Date: Thu, 7 Jun 2018 14:45:29 +0100 [thread overview]
Message-ID: <ab6e3d25-f0dc-1e1a-0b11-522a36217b79@citrix.com> (raw)
In-Reply-To: <5B19315402000078001C91C3@prv1-mh.provo.novell.com>
On 06/07/2018 02:21 PM, Jan Beulich wrote:
>>>> On 07.06.18 at 13:42, <Paul.Durrant@citrix.com> wrote:
>>> From: Jan Beulich [mailto:JBeulich@suse.com]
>>> Sent: 16 March 2018 12:25
>>>>>> On 12.02.18 at 11:47, <paul.durrant@citrix.com> wrote:
>>>> --- a/xen/arch/x86/Makefile
>>>> +++ b/xen/arch/x86/Makefile
>>>> @@ -33,6 +33,7 @@ obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
>>>> obj-y += hypercall.o
>>>> obj-y += i387.o
>>>> obj-y += i8259.o
>>>> +obj-y += iommu_op.o
>>>
>>> As mentioned in other contexts, I'd prefer if we stopped using
>>> underscores in places where dashes (or other separators not
>>> usable in C identifiers) are fine.
>>
>> I don't see any guidance in CODING_STYLE or elsewhere, and also the majority
>> of the codebase seems to prefer using underscores in module names. Personally
>> I'd prefer new code remain consistent.
>
> The lack of statement to this effect is why I've said "I'd prefer". See
> alternative-asm.h, x86-defns.h, or x86-vendors.h for _recent_
> examples of moving into the other direction. On all keyboards I've
> seen or used, an underscore requires two keys to be pressed, while
> a dash takes only one. This isn't much for an individual instance, but
> it sums up. It's the same reason why I'm advocating against the use
> of underscores in new command line option names.
>
> In the end, looking at the history of typography, I think underscore
> is a relatively late (and presumably artificial) addition; in particular I
> don't recall mechanical type writers to even have a key for it.
<pedantic>The mechanical typewriters I learned on had an underscore to
allow you to go back and underline words.</pedantic>
> It's
> use as a visual separator is necessary in e.g. programming
> languages, as commonly dash designated the operator for "minus"
> there. Extending such naming to non-identifiers (file system names
> and command line options are just prominent examples) is simply
> misguided imo.
Well in any case, maybe this should be discussed in a patch to
CODING_STYLE, rather than in the middle of a patch series about
something completely different.
>>>> +#ifndef __XEN_PUBLIC_IOMMU_OP_H__
>>>> +#define __XEN_PUBLIC_IOMMU_OP_H__
>>>
>>> Please can you avoid introducing further name space violations
>>> into the public headers?
>>
>> I assume you mean the leading '__'? Again, I chose the name based on
>> consistency with other code and I'd prefer to remain consistent. Could you
>> explain why having a leading '__' is problematic?
>
> Names starting with double underscores are reserved (as are, btw,
> names starting with a single underscore and an upper case letter).
> While it's unlikely for a compiler to ever want to use
> __XEN_PUBLIC_IOMMU_OP_H__ for its internal purposes, we couldn't
> validly complain if one did.
I'm with Jan on this one. At the moment I'm not sure about using dashes
instead of underscores for filenames, but in this case the extra
underscores at the beginning and end are redundant; the "XEN_..._H" is
sufficient to make the contents unique.
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-06-07 13:45 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 10:47 [PATCH 0/7] paravirtual IOMMU interface Paul Durrant
2018-02-12 10:47 ` [PATCH 1/7] iommu: introduce the concept of BFN Paul Durrant
2018-03-15 13:39 ` Jan Beulich
2018-03-16 10:31 ` Paul Durrant
2018-03-16 10:39 ` Jan Beulich
2018-02-12 10:47 ` [PATCH 2/7] iommu: make use of type-safe BFN and MFN in exported functions Paul Durrant
2018-03-15 15:44 ` Jan Beulich
2018-03-16 10:26 ` Paul Durrant
2018-07-10 14:29 ` George Dunlap
2018-07-10 14:34 ` Jan Beulich
2018-07-10 14:37 ` Andrew Cooper
2018-07-10 14:58 ` George Dunlap
2018-07-10 15:19 ` Jan Beulich
2018-02-12 10:47 ` [PATCH 3/7] iommu: push use of type-safe BFN and MFN into iommu_ops Paul Durrant
2018-03-15 16:15 ` Jan Beulich
2018-03-16 10:22 ` Paul Durrant
2018-02-12 10:47 ` [PATCH 4/7] vtd: add lookup_page method to iommu_ops Paul Durrant
2018-03-15 16:54 ` Jan Beulich
2018-03-16 10:19 ` Paul Durrant
2018-03-16 10:28 ` Jan Beulich
2018-03-16 10:41 ` Paul Durrant
2018-02-12 10:47 ` [PATCH 5/7] public / x86: introduce __HYPERCALL_iommu_op Paul Durrant
2018-02-13 6:43 ` Tian, Kevin
2018-02-13 9:22 ` Paul Durrant
2018-02-23 5:17 ` Tian, Kevin
2018-02-23 9:41 ` Paul Durrant
2018-02-24 2:57 ` Tian, Kevin
2018-02-26 9:57 ` Paul Durrant
2018-02-26 11:55 ` Tian, Kevin
2018-02-27 5:05 ` Tian, Kevin
2018-02-27 9:32 ` Paul Durrant
2018-02-28 2:53 ` Tian, Kevin
2018-02-28 8:55 ` Paul Durrant
2018-03-16 12:25 ` Jan Beulich
2018-06-07 11:42 ` Paul Durrant
2018-06-07 13:21 ` Jan Beulich
2018-06-07 13:45 ` George Dunlap [this message]
2018-06-07 14:06 ` Paul Durrant
2018-06-07 14:21 ` Ian Jackson
2018-06-07 15:21 ` Paul Durrant
2018-06-07 15:41 ` Jan Beulich
2018-02-12 10:47 ` [PATCH 6/7] x86: add iommu_op to query reserved ranges Paul Durrant
2018-02-13 6:51 ` Tian, Kevin
2018-02-13 9:25 ` Paul Durrant
2018-02-23 5:23 ` Tian, Kevin
2018-02-23 9:02 ` Jan Beulich
2018-03-19 14:10 ` Jan Beulich
2018-03-19 15:13 ` Paul Durrant
2018-03-19 16:30 ` Jan Beulich
2018-03-19 15:13 ` Jan Beulich
2018-03-19 15:36 ` Paul Durrant
2018-03-19 16:31 ` Jan Beulich
2018-02-12 10:47 ` [PATCH 7/7] x86: add iommu_ops to map and unmap pages, and also to flush the IOTLB Paul Durrant
2018-02-13 6:55 ` Tian, Kevin
2018-02-13 9:55 ` Paul Durrant
2018-02-23 5:35 ` Tian, Kevin
2018-02-23 9:35 ` Paul Durrant
2018-02-24 3:01 ` Tian, Kevin
2018-02-26 9:38 ` Paul Durrant
2018-03-19 15:11 ` Jan Beulich
2018-03-19 15:34 ` Paul Durrant
2018-03-19 16:49 ` Jan Beulich
2018-03-19 16:57 ` Paul Durrant
2018-03-20 8:11 ` Jan Beulich
2018-03-20 9:32 ` Paul Durrant
2018-03-20 9:49 ` Jan Beulich
2018-02-13 6:21 ` [PATCH 0/7] paravirtual IOMMU interface Tian, Kevin
2018-02-13 9:18 ` Paul Durrant
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=ab6e3d25-f0dc-1e1a-0b11-522a36217b79@citrix.com \
--to=george.dunlap@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=paul.durrant@citrix.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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).