linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linuxfoundation.org>,
	Andrew Morton <akpm@linuxfoundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Christoph Hellwig <hch@lst.de>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Rob Herring <rob.herring@linaro.org>,
	Jonas Oberg <jonas@fsfe.org>, Joe Perches <joe@perches.com>,
	linux-xfs@vger.kernel.org,
	Charlemagne Lasse <charlemagnelasse@gmail.com>,
	Carmen Bianca Bakker <carmenbianca@fsfe.org>
Subject: Re: [V4, 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses
Date: Fri, 5 Jan 2018 14:48:04 -0800	[thread overview]
Message-ID: <7769bd49-146b-ea8c-3b2c-b5987653a665@gmail.com> (raw)
In-Reply-To: <20180105130526.GA31648@piout.net>

On 01/05/18 05:05, Alexandre Belloni wrote:
> Hi,
> 
> I'm definitively late to the party but...
> 
> On 17/11/2017 at 11:00:33 +0100, Thomas Gleixner wrote:
>> +2. Style:
>> +
>> +   The SPDX license identifier is added in form of a comment.  The comment
>> +   style depends on the file type::
>> +
>> +      C source:   // SPDX-License-Identifier: <SPDX License Expression>
>> +      C header:   /* SPDX-License-Identifier: <SPDX License Expression> */
>> +      ASM:        /* SPDX-License-Identifier: <SPDX License Expression> */
>> +      scripts:    # SPDX-License-Identifier: <SPDX License Expression>
>> +      .rst:	  .. SPDX-License-Identifier: <SPDX License Expression>
>> +      .dts{i}:	  // SPDX-License-Identifier: <SPDX License Expression>
> 
> dtc doesn't handle // comments. This works in the kernel tree because

dtc does handle // comments.


$ cat test_comment.dts 
/dts-v1/;

// this is comment 1

/* this is comment 2 */

/ {
	#address-cells = < 1 >;
	#size-cells = < 1 >;

	// this is comment 3

	tree_1: soc@0 {
		reg = <0x0 0x0>;
	};

};


Using the dtc version in linux v4.14:

$ dtc -v
Version: DTC 1.4.4-g756ffc4f

$ dtc -O dts test_comment.dts
/dts-v1/;

/ {
  	#address-cells = <0x1>;
	#size-cells = <0x1>;

	tree_1: soc@0 {
		reg = <0x0 0x0>;
	};
};


Using the latest dtc version in the git_dtc repo:

$ dtc -v
Version: DTC 1.4.6-ge5438801

$ dtc -O dts test_comment.dts 
/dts-v1/;

/ {
	#address-cells = <0x1>;
	#size-cells = <0x1>;

	tree_1: soc@0 {
		reg = <0x0 0x0>;
	};
};

-Frank


> dts files are preprocessed by CPP. But this doesn't work when using dtc
> directly (most likely when compiling DT overlays). So, the choice is
> between making dtc handle // comments or changing the documentation.
> 
> I don't have an opinion and Rob doesn't seem to care but I think we need
> to do something now instead of letting each maintainer have to handle
> this issue.
> 
>> +   If a specific tool cannot handle the standard comment style, then the
>> +   appropriate comment mechanism which the tool accepts shall be used. This
>> +   is the reason for having the "/\* \*/" style comment in C header
>> +   files. There was build breakage observed with generated .lds files where
>> +   'ld' failed to parse the C++ comment. This has been fixed by now, but
>> +   there are still older assembler tools which cannot handle C++ style
>> +   comments.
>> +


  parent reply	other threads:[~2018-01-05 22:48 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 18:33 [patch V2 00/11] LICENSES: Add documentation and initial License files Thomas Gleixner
2017-11-16 18:33 ` [patch V2 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses Thomas Gleixner
2017-11-16 19:44   ` Rob Herring
2017-11-16 20:57   ` [patch V3 " Jonathan Corbet
2017-11-17  9:48     ` Thomas Gleixner
2017-11-17 22:38       ` Jonathan Corbet
2017-11-17 10:00   ` [patch V4 " Thomas Gleixner
2017-11-17 11:58     ` Philippe Ombredanne
     [not found]     ` <CAG_66ZRPXxodLw=eeTRtXuRGfvmonVNknzNmMuNMVooJgd1Uxw@mail.gmail.com>
2017-11-17 13:16       ` Thomas Gleixner
2017-11-17 17:06     ` Mauro Carvalho Chehab
2017-11-17 18:11       ` Thomas Gleixner
2017-11-17 18:39         ` Christoph Hellwig
2017-11-22 11:12           ` Thomas Gleixner
2017-11-22 11:51             ` Mauro Carvalho Chehab
2017-11-22 13:23               ` Christoph Hellwig
2017-11-22 13:35                 ` Mauro Carvalho Chehab
2017-11-22 13:48               ` Greg Kroah-Hartman
2017-11-25 19:04                 ` Pavel Machek
2017-11-25 19:11                   ` Linus Torvalds
2017-11-25 19:17                     ` Pavel Machek
2017-11-25 19:30                       ` Linus Torvalds
2017-11-25 19:53                         ` Mauro Carvalho Chehab
2017-11-25 20:30                           ` Linus Torvalds
2017-11-25 18:51       ` Pavel Machek
2017-11-25 23:41         ` Philippe Ombredanne
2017-11-17 19:02     ` Jonas Oberg
2017-12-14 16:25     ` Joe Perches
2017-12-14 16:29       ` Thomas Gleixner
2018-01-05 13:05     ` [V4, " Alexandre Belloni
2018-01-05 18:55       ` Russell King - ARM Linux
2018-01-05 22:48       ` Frank Rowand [this message]
2018-01-05 23:05         ` Alexandre Belloni
2017-11-17 10:07   ` [patch V2 " Greg Kroah-Hartman
2017-11-17 10:17   ` Carmen Bianca Bakker
2017-11-17 10:21     ` Thomas Gleixner
2017-11-16 18:33 ` [patch V2 02/11] LICENSES: Add the GPL 2.0 license Thomas Gleixner
2017-11-17 10:09   ` Greg Kroah-Hartman
2017-11-18 19:03   ` Charlemagne Lasse
2017-11-18 19:05     ` Charlemagne Lasse
2017-11-18 19:13     ` Jonas Oberg
2017-11-18 19:14     ` Linus Torvalds
2017-11-18 20:41       ` Charlemagne Lasse
2017-11-19  8:50         ` Charlemagne Lasse
2017-11-20 15:31       ` Alan Cox
2017-11-20 15:42         ` Russell King - ARM Linux
2017-11-21  8:27         ` Jonas Oberg
2017-11-21 13:57         ` Philippe Ombredanne
2017-11-21 17:55           ` Philippe Ombredanne
2017-11-20  9:42     ` Thomas Gleixner
2017-11-16 18:33 ` [patch V2 03/11] LICENSES: Add the LGPL " Thomas Gleixner
2017-11-17 10:09   ` Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 04/11] LICENSES: Add the LGPL-2.1 license Thomas Gleixner
2017-11-17 10:09   ` Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 05/11] LICENSES: Add the BSD 2-clause "Simplified" license Thomas Gleixner
2017-11-17 10:08   ` Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 06/11] LICENSES: Add the BSD 3-clause "New" or "Revised" License Thomas Gleixner
2017-11-17 10:09   ` Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 07/11] LICENSES: Add the BSD-3-clause "Clear" license Thomas Gleixner
2017-11-17 10:08   ` Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 08/11] LICENSES: Add the MIT license Thomas Gleixner
2017-11-16 18:33 ` [patch V2 09/11] LICENSES: Add Linux syscall note exception Thomas Gleixner
2017-11-16 21:00   ` [patch V3 " Jonathan Corbet
2017-11-17 10:07   ` [patch V2 " Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 10/11] LICENSES: Add the GPL 1.0 license Thomas Gleixner
2017-11-17 10:08   ` Greg Kroah-Hartman
2017-11-16 18:33 ` [patch V2 11/11] LICENSES: Add MPL-1.1 license Thomas Gleixner
2017-11-17 10:08   ` Greg Kroah-Hartman
2017-11-16 19:25 ` [patch V2 00/11] LICENSES: Add documentation and initial License files Thomas Gleixner

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=7769bd49-146b-ea8c-3b2c-b5987653a665@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=akpm@linuxfoundation.org \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=carmenbianca@fsfe.org \
    --cc=charlemagnelasse@gmail.com \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=joe@perches.com \
    --cc=jonas@fsfe.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=pombredanne@nexb.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=rob.herring@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linuxfoundation.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).