diff mbox series

[2/4] drm/i915/gt: Fix SPDX license format

Message ID 20250314021225.11813-3-andi.shyti@linux.intel.com (mailing list archive)
State New
Headers show
Series Trivial style fixes | expand

Commit Message

Andi Shyti March 14, 2025, 2:12 a.m. UTC
Header files need to declare the SPDX under /* ... */ style
comments at the beginning of the file.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_wopcm.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Krzysztof Karas March 18, 2025, 10:55 a.m. UTC | #1
Hi Andi

> Header files need to declare the SPDX under /* ... */ style
All files modified in this patch series start with:
// SPDX-License-Identifier: MIT
rather than:
/* SPDX-License-Identifier: MIT */

As a note:
:~/linux/drm-tip/drivers/gpu/drm/i915$ rg "// SPDX-License-Identifier: " | wc -l
242
:~/linux/drm-tip/drivers/gpu/drm/i915$ rg "/* SPDX-License-Identifier: " | wc -l
696

are those styles interchangable or is one preferred over the
other? I am just curious seeing both are being used.

Best Regards,
Krzysztof
Andi Shyti March 19, 2025, 12:34 a.m. UTC | #2
On Tue, Mar 18, 2025 at 10:55:03AM +0000, Krzysztof Karas wrote:
> > Header files need to declare the SPDX under /* ... */ style
> All files modified in this patch series start with:
> // SPDX-License-Identifier: MIT
> rather than:
> /* SPDX-License-Identifier: MIT */
> 
> As a note:
> :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "// SPDX-License-Identifier: " | wc -l
> 242
> :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "/* SPDX-License-Identifier: " | wc -l
> 696
> 
> are those styles interchangable or is one preferred over the
> other? I am just curious seeing both are being used.

It's an ugly mess that for some reason people have accepted from
the beginning. The SPDX license has a different format for .c and
.h file :/

Andi
Gote, Nitin R March 20, 2025, 7:38 a.m. UTC | #3
HI Andi,

> On Tue, Mar 18, 2025 at 10:55:03AM +0000, Krzysztof Karas wrote:
> > > Header files need to declare the SPDX under /* ... */ style
> > All files modified in this patch series start with:
> > // SPDX-License-Identifier: MIT
> > rather than:
> > /* SPDX-License-Identifier: MIT */
> >
> > As a note:
> > :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "// SPDX-License-Identifier:
> > " | wc -l
> > 242
> > :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "/* SPDX-License-Identifier:
> > " | wc -l
> > 696
> >
> > are those styles interchangable or is one preferred over the other? I
> > am just curious seeing both are being used.
> 
> It's an ugly mess that for some reason people have accepted from the beginning.
> The SPDX license has a different format for .c and .h file :/
> 
> Andi

A similar change is required in selftests/mock_timeline.h header also. 

As per https://docs.kernel.org/process/license-rules.html, 
for ASM files also required this style:     /* SPDX-License-Identifier: <SPDX License Expression> */

There are two asm files hsw.asm and ivb.asm under  i915/gt/shaders/clear_kernel.
It will be better if we update the license style in asm files as well.

Regards,
Nitin
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_wopcm.h b/drivers/gpu/drm/i915/gt/intel_wopcm.h
index 17d6aa86008a..d2038b6de5e7 100644
--- a/drivers/gpu/drm/i915/gt/intel_wopcm.h
+++ b/drivers/gpu/drm/i915/gt/intel_wopcm.h
@@ -1,6 +1,5 @@ 
+/* SPDX-License-Identifier: MIT */
 /*
- * SPDX-License-Identifier: MIT
- *
  * Copyright © 2017-2018 Intel Corporation
  */