[dpdk-dev] [PATCH 0/5] Use SPDX tags on C files

Bruce Richardson bruce.richardson at intel.com
Wed Dec 20 12:16:45 CET 2017


On Wed, Dec 20, 2017 at 10:06:55AM +0000, Bruce Richardson wrote:
> On Wed, Dec 20, 2017 at 12:21:21PM +0530, Hemant Agrawal wrote:
> > On 12/19/2017 8:03 PM, Bruce Richardson wrote:
> > > This contains the output of a script run to replace the BSD License with
> > > SPDX tags on Intel copyright files. The script should only have modified
> > > files with a single, Intel copyright on them, and ignored all files that
> > > had multiple copyright lines. Due to variance in the headers used, not all
> > > files were updated automatically, 11 files were manually done in this set
> > > too. Any others missed can be updated in later sets once found.
> > > 
> > 
> > SPDX tag is in 2nd line, first line of files is still "/*-" or it's
> > variances.
> > 
> > Linux uses the SPDX in the very first line as it will help in checkpatch and
> > other tools.
> > 
> > The proposed licenses/README states:
> > "DPDK uses first line of the file to be SPDX tag. In case of *#!* scripts,
> > SPDX tag can be placed in 2nd line of the file.
> > 
> 
> So what is the expected format for these headers - using "//" or "/* */"
> for the first-line tag? What about for the copyright lines?
> 
> If we want the SPDX identifier as the first line we have a number of
> options, and we should settle on one. Here are the options I see:
> [1]
> /* SPDX-License-Identifier: BSD-3-Clause
>  * Copyright(c) 2010-2014 Intel Corporation
>  */
> 
> Which can work, if you don't mind the unbalanced /* vs */ inline vs
> separate line.
> 
> Alternatively, we can use // for some or all of the tag and copyright:
> [2]
> // SPDX-License-Identifier: BSD-3-Clause
> // Copyright(c) 2010-2014 Intel Corporation
> 
> or
> [3]
> // SPDX-License-Identifier: BSD-3-Clause
> /* Copyright(c) 2010-2014 Intel Corporation
>  */
> 
> [For the latter, I think the close */ should be on a newline to look ok
> in the case of multiple copyrights, and an "All rights reserved" line if
> present]
> 
> Finally, I suppose there is the (ugly IMHO) option of:
> [4]
> // SPDX-License-Identifier: BSD-3-Clause
> /*
>  * Copyright(c) 2010-2014 Intel Corporation
>  */
> 
> Any other options?
> 
> My preference, given that we only use /* */ style comments in DPDK is
> option 1. If we don't use that, I think option 3 is next best, then 2.
> I notice from the dpaa2 code update patch [pw 32407], you have taken a
> similar approach to option 1 (just with an extra blank line, which is
> fine)
> 
> Any other opinions or comments? Anyone disagree with using option #1
> above, and as done by Hemant in his set?
> 

Since my preferred option and Hemant's seem to align, I'm going to do a
V2 based on that. If anyone has strong objections to this approach,
please shout them out, otherwise I want to keep this effort moving while
it has momentum.

Thanks,
/Bruce


More information about the dev mailing list