Hey Bastien,

> -----Original Message-----
> From: Bastien Nocera <[email protected]>
> Hello Tim,
> 
> On Wed, 2026-06-03 at 18:41 -0600, Tim Bird wrote:
> > Many bluetooth source files are missing SPDX-License-Identifier
> > lines. Add appropriate IDs to these files, and remove other
> > license lines from the headers.
> 
> I think it would be useful to separate the changes in drivers/bluetooth
> and the ones in {include/,}net/bluetooth.

I thought about that.  There's only one file in drivers/bluetooth in this 
patch, 
and it's got a very straightforward and unambiguous license situation.
I thought it would be easier for the Bluetooth maintainers to see one patch
instead of multiple, but I can break that one file out if needed.

These types of changes are usually done in batches, with patch boundaries
matching maintainer or sub-system boundaries, rather than directory
boundaries.

> 
> Why do some of the id lines use C-style comments and others C++-style
> comments? (/* */ vs. //) ?

This is due to some old parsers that operate on kernel source not handling
// in .h files very well.
See Documentation/process/license-rules.rst (Section 2 on Style:)
 
> > Leave the warranty disclaimer in files where the license ID is
> > GPL-2.0 but the wording of the disclaimer is slightly different
> > from that of the GPL v2 disclaimer.
> >
> > It is not different enough to cause licensing conflicts, but is
> > kept to honor the original contributors' legal intent.
> 
> Good job doing this, do you know if there's a plan to automate this
> somehow?

A lot of what could be done automatically was already done, in 
2017 by Greg KH and in 2019 by Thomas Gleixner.  I'm following up
now on files that were either overlooked, or have special issues.

I do use tools for analysis and to help automate some tasks.
See https://github.com/tbird20d/spdx-project

> It would be great to be able to re-run a script on top of a
> codebase to verify that no sources were missed, and that we got the
> same license ID assigned for the same license verbiage in the source
> headers.

See scripts/spdxcheck.py.

I also have some automation that checks
the overall status (by top-level kernel directory), with results posted here:
https://birdcloud.org/bc/KTest_Missing_SPDX

Some of the tools I use check the license verbiage in the source headers,
but I also manually compare the verbiage to make sure I am assigning
the right license.  In the case of these Bluetooth files, the verbiage is quite
clear about the intended license, but I got caught by some differences
in the warranty disclaimer that I missed, making a second version of this
patch necessary.
   -- Tim

P.S. I gave a talk on this work at Open Source Summit North America a few weeks 
ago.
You can find my slides and info about that talk here: 
https://osselcna2026.sched.com/event/2JQtC/spdx-and-sbom-work-for-the-linux-kernel-tim-bird-sony-electronics

Reply via email to