lkml.org 
[lkml]   [2018]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v13 11/13] platform/x86: Intel SGX driver
On Thu, Sep 06, 2018 at 07:35:46PM +0200, Miguel Ojeda wrote:
> Hi Jarkko,
>
> On Thu, Sep 6, 2018 at 11:21 AM, Jarkko Sakkinen
> <jarkko.sakkinen@linux.intel.com> wrote:
> > There is another open. If I grep through the kernel tree I see SPDX
> > headers that are decorated both with C99- and C89-style comments. I
> > guess I ended up using C99-style because when I was instructed to add
> > SPDX headers in the first place that was the example I was given. Still
> > checkpatch.pl complains about C99-style comments.
> >
> > Which one is right and why the kernel tree is polluted with C99-headers
> > when they do not pass checkpatch.pl? How those commits were ever
> > accepted?
>
> See Documentation/process/license-rules.rst. Headers should go with
> C-style comments:
>
> 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> */
>
> And:
>
> 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.
>
> The ones that got in are probably either old or they slipped through
> (and they do not break the build).

Thank you, this clears things up. Highly appreciated!

> Cheers,
> Miguel

/Jarkko

\
 
 \ /
  Last update: 2018-09-10 20:33    [W:0.265 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site