lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 02 Jun 2019 11:04:28 -0700
From:   Joe Perches <joe@...ches.com>
To:     Valdis Klētnieks <valdis.kletnieks@...edu>,
        Rob Herring <robh@...nel.org>,
        Andy Whitcroft <apw@...onical.com>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: checkpatch query regarding .c and .h files..

On Sun, 2019-06-02 at 13:02 -0400, Valdis Klētnieks wrote:
> scripts/checkpatch.pl contains this code near line 3070:
> 
>                                if ($realfile =~ /\.(h|s|S)$/) {
>                                         $comment = '/*';
>                                 } elsif ($realfile =~ /\.(c|dts|dtsi)$/) {
>                                         $comment = '//';
>                                 } elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc)$/) {
>                                         $comment = '#';
>                                 } elsif ($realfile =~ /\.rst$/) {
>                                         $comment = '..';
>                                 }
> 
> Was there a specific reason why .h files have /* */ and .c files have C89 // on
> the SPDX comment line?
> 
> Would anybody like a patch that fixed checkpatch to allow either flavor on .c and .h files?
> (I know I would, I just blew close to an hour trying to figure out why it whined about a
> SPDX in a .h file I'm getting ready to upstream...)

It's described in Documentation/process/license-rules.rst

----------------------------------

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> */

----------------------------------

It was because old versions of build tools could not handle
// in asm files.

It could be changed today because build tool version minimums
have been increased.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ