Skip to contentSkip to conversation

docs/devel/tracing: Update trace.h creation rune to include SPDX

PATCH New Peter Maydell 1 participant 1 message Jul 7, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs/devel/tracing: Update trace.h creation rune to include SPDX

checkpatch now checks that new files have an SPDX line. If you use the shell rune in tracing.rst to create a trace.h wrapper header, this triggers checkpatch to complain.

Although these files are tiny, it's worth having the SPDX line to avoid having to add extra exception cases to checkpatch.

Update the rune to include creating an SPDX line.

---
NB that checkpatch's SPDX test gets confused by this patch:
^* matches null string many times in regex; marked by <-- HERE in m/^* <-- HERE /'$/ at ./scripts/checkpatch.pl line 1389

---
 docs/devel/tracing.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/devel/tracing.rst +1 -1
index 043bed7fd0f..f4557ee20e4 100644
@@ -76,7 +76,7 @@ The "io/trace.h" file must be created manually with an #include of the
 corresponding "trace/trace-<subdir>.h" file that will be generated in the
 builddir::
 
-  $ echo '#include "trace/trace-io.h"' >io/trace.h
+  $ (echo '/* SPDX-License-Identifier: GPL-2.0-or-later */' ; echo '#include "trace/trace-io.h"')  >io/trace.h
 
 While it is possible to include a trace.h file from outside a source file's own
 sub-directory, this is discouraged in general. It is strongly preferred that
Signature · 1 line
2.43.0