[lkml]   [2018]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [V4, 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses

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
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.
> +
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering

 \ /
  Last update: 2018-01-05 14:05    [W:0.131 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site