Skip to contentSkip to conversation

drm/amdkfd: make SPDX License expression more sound

PATCH Applied Lukas Bulwahn 4 participants 5 messages Dec 16, 2021 – Jan 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: make SPDX License expression more sound

Commit b5f57384805a ("drm/amdkfd: Add sysfs bitfields and enums to uAPI") adds include/uapi/linux/kfd_sysfs.h with the "GPL-2.0 OR MIT WITH Linux-syscall-note" SPDX-License expression.

The command ./scripts/spdxcheck.py warns:

include/uapi/linux/kfd_sysfs.h: 1:48 Exception not valid for license MIT: Linux-syscall-note

For a uapi header, the file under GPLv2 License must be combined with the Linux-syscall-note, but combining the MIT License with the Linux-syscall-note makes no sense, as the note provides an exception for GPL-licensed code, not for permissively licensed code.

So, reorganize the SPDX expression to only combine the note with the GPL License condition. This makes spdxcheck happy again.

---
I am not a lawyer and I do not intend to modify the actual licensing of this header file. So, I really would like to have an Ack from some AMD developer here.

Maybe also a lawyer on the linux-spdx list can check my reasoning on the licensing with the exception note?

 include/uapi/linux/kfd_sysfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/kfd_sysfs.h +1 -1
index e1fb78b4bf09..3e330f368917 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 OR MIT WITH Linux-syscall-note */
+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
 /*
  * Copyright 2021 Advanced Micro Devices, Inc.
  *
Signature · 1 line
2.17.1
#1 lore raw
Quoted 17 lines · Lukas Bulwahn

Commit b5f57384805a ("drm/amdkfd: Add sysfs bitfields and enums to uAPI") adds include/uapi/linux/kfd_sysfs.h with the "GPL-2.0 OR MIT WITH Linux-syscall-note" SPDX-License expression.

The command ./scripts/spdxcheck.py warns:

include/uapi/linux/kfd_sysfs.h: 1:48 Exception not valid for license MIT: Linux-syscall-note

For a uapi header, the file under GPLv2 License must be combined with the Linux-syscall-note, but combining the MIT License with the Linux-syscall-note makes no sense, as the note provides an exception for GPL-licensed code, not for permissively licensed code.

So, reorganize the SPDX expression to only combine the note with the GPL License condition. This makes spdxcheck happy again.

Quoted 8 lines

---
I am not a lawyer and I do not intend to modify the actual licensing of this header file. So, I really would like to have an Ack from some AMD developer here.

Maybe also a lawyer on the linux-spdx list can check my reasoning on the licensing with the exception note?

I believe "MIT WITH Linux-syscall-note" is a syntactically correct SPDX expression but is otherwise sort of non-meaningful. "(GPL-2.0 WITH Linux-syscall-note) OR MIT" is presumably what is intended here. But yes would be good to get confirmation from someone associated with AMD.

Richard

Reviewed-by
#2 lore raw
Quoted 25 lines · Richard Fontana
Quoted 23 lines · Lukas Bulwahn

Commit b5f57384805a ("drm/amdkfd: Add sysfs bitfields and enums to uAPI") adds include/uapi/linux/kfd_sysfs.h with the "GPL-2.0 OR MIT WITH Linux-syscall-note" SPDX-License expression.

The command ./scripts/spdxcheck.py warns:

include/uapi/linux/kfd_sysfs.h: 1:48 Exception not valid for license MIT: Linux-syscall-note

For a uapi header, the file under GPLv2 License must be combined with the Linux-syscall-note, but combining the MIT License with the Linux-syscall-note makes no sense, as the note provides an exception for GPL-licensed code, not for permissively licensed code.

So, reorganize the SPDX expression to only combine the note with the GPL License condition. This makes spdxcheck happy again.

---
I am not a lawyer and I do not intend to modify the actual licensing of this header file. So, I really would like to have an Ack from some AMD developer here.

Quoted 8 lines
Quoted 2 lines

Maybe also a lawyer on the linux-spdx list can check my reasoning on the licensing with the exception note?

I believe "MIT WITH Linux-syscall-note" is a syntactically correct SPDX expression but is otherwise sort of non-meaningful. "(GPL-2.0 WITH Linux-syscall-note) OR MIT" is presumably what is intended here. But yes would be good to get confirmation from someone associated with AMD.

Thanks Lukas, I agree that this is indeed clearer. +1

Reviewed-by [email protected]
maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Lukas Bulwahn

Am 2021-12-16 um 4:45 a.m. schrieb Lukas Bulwahn:

Quoted 13 lines

Commit b5f57384805a ("drm/amdkfd: Add sysfs bitfields and enums to uAPI") adds include/uapi/linux/kfd_sysfs.h with the "GPL-2.0 OR MIT WITH Linux-syscall-note" SPDX-License expression.

The command ./scripts/spdxcheck.py warns:

include/uapi/linux/kfd_sysfs.h: 1:48 Exception not valid for license MIT: Linux-syscall-note

For a uapi header, the file under GPLv2 License must be combined with the Linux-syscall-note, but combining the MIT License with the Linux-syscall-note makes no sense, as the note provides an exception for GPL-licensed code, not for permissively licensed code.

Quoted 4 lines

So, reorganize the SPDX expression to only combine the note with the GPL License condition. This makes spdxcheck happy again.

Quoted 21 lines

---
I am not a lawyer and I do not intend to modify the actual licensing of this header file. So, I really would like to have an Ack from some AMD developer here.

Maybe also a lawyer on the linux-spdx list can check my reasoning on the licensing with the exception note?

 include/uapi/linux/kfd_sysfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/kfd_sysfs.h +1 -1
index e1fb78b4bf09..3e330f368917 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 OR MIT WITH Linux-syscall-note */
+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
 /*
  * Copyright 2021 Advanced Micro Devices, Inc.
  *
maintainer Applied
#4 lore raw
Quoted 14 lines · Felix Kuehling

Am 2021-12-16 um 4:45 a.m. schrieb Lukas Bulwahn:

Quoted 13 lines

Commit b5f57384805a ("drm/amdkfd: Add sysfs bitfields and enums to uAPI") adds include/uapi/linux/kfd_sysfs.h with the "GPL-2.0 OR MIT WITH Linux-syscall-note" SPDX-License expression.

The command ./scripts/spdxcheck.py warns:

include/uapi/linux/kfd_sysfs.h: 1:48 Exception not valid for license MIT: Linux-syscall-note

For a uapi header, the file under GPLv2 License must be combined with the Linux-syscall-note, but combining the MIT License with the Linux-syscall-note makes no sense, as the note provides an exception for GPL-licensed code, not for permissively licensed code.

Quoted 5 lines
Quoted 4 lines

So, reorganize the SPDX expression to only combine the note with the GPL License condition. This makes spdxcheck happy again.

I applied the patch to amd-staging-drm-next.

Regards,
  Felix

Quoted 23 lines
Quoted 23 lines

---
I am not a lawyer and I do not intend to modify the actual licensing of this header file. So, I really would like to have an Ack from some AMD developer here.

Maybe also a lawyer on the linux-spdx list can check my reasoning on the licensing with the exception note?

  include/uapi/linux/kfd_sysfs.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/kfd_sysfs.h +1 -1
index e1fb78b4bf09..3e330f368917 100644
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 OR MIT WITH Linux-syscall-note */
+/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
  /*
   * Copyright 2021 Advanced Micro Devices, Inc.
   *