Linux-SPDX Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] gpu/drm_memory: fix a few warnings
@ 2019-07-08 18:05 Qian Cai
  2019-07-08 19:21 ` Ilia Mirkin
  0 siblings, 1 reply; 5+ messages in thread
From: Qian Cai @ 2019-07-08 18:05 UTC (permalink / raw)
  To: akpm
  Cc: airlied, daniel, maarten.lankhorst, sean, joe, linux-spdx,
	dri-devel, linux-kernel, Qian Cai

The opening comment mark "/**" is reserved for kernel-doc comments, so
it will generate a warning with "make W=1".

drivers/gpu/drm/drm_memory.c:2: warning: Cannot understand  * \file
drm_memory.c

Also, silence a checkpatch warning by adding a license identfiter where
it indicates the MIT license further down in the source file.

WARNING: Missing or malformed SPDX-License-Identifier tag in line 1

It becomes redundant to add both an SPDX identifier and have a
description of the license in the comment block at the top, so remove
the later.

Signed-off-by: Qian Cai <cai@lca.pw>
---

v2: remove the redundant description of the license.

 drivers/gpu/drm/drm_memory.c | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index 132fef8ff1b6..86a11fc8e954 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -1,4 +1,5 @@
-/**
+// SPDX-License-Identifier: MIT
+/*
  * \file drm_memory.c
  * Memory management wrappers for DRM
  *
@@ -12,25 +13,6 @@
  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <linux/highmem.h>
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] gpu/drm_memory: fix a few warnings
  2019-07-08 18:05 [PATCH v2] gpu/drm_memory: fix a few warnings Qian Cai
@ 2019-07-08 19:21 ` Ilia Mirkin
  2019-07-08 19:41   ` Qian Cai
  0 siblings, 1 reply; 5+ messages in thread
From: Ilia Mirkin @ 2019-07-08 19:21 UTC (permalink / raw)
  To: Qian Cai
  Cc: Andrew Morton, David Airlie, Daniel Vetter, Maarten Lankhorst,
	Sean Paul, joe, linux-spdx, dri-devel, LKML

On Mon, Jul 8, 2019 at 2:06 PM Qian Cai <cai@lca.pw> wrote:
>
> The opening comment mark "/**" is reserved for kernel-doc comments, so
> it will generate a warning with "make W=1".
>
> drivers/gpu/drm/drm_memory.c:2: warning: Cannot understand  * \file
> drm_memory.c
>
> Also, silence a checkpatch warning by adding a license identfiter where
> it indicates the MIT license further down in the source file.
>
> WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
>
> It becomes redundant to add both an SPDX identifier and have a
> description of the license in the comment block at the top, so remove
> the later.
>
> Signed-off-by: Qian Cai <cai@lca.pw>
> ---
>
> v2: remove the redundant description of the license.
>
>  drivers/gpu/drm/drm_memory.c | 22 ++--------------------
>  1 file changed, 2 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
> index 132fef8ff1b6..86a11fc8e954 100644
> --- a/drivers/gpu/drm/drm_memory.c
> +++ b/drivers/gpu/drm/drm_memory.c
> @@ -1,4 +1,5 @@
> -/**
> +// SPDX-License-Identifier: MIT
> +/*
>   * \file drm_memory.c
>   * Memory management wrappers for DRM
>   *
> @@ -12,25 +13,6 @@
>   * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
>   * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
>   * All Rights Reserved.
> - *
> - * Permission is hereby granted, free of charge, to any person obtaining a
> - * copy of this software and associated documentation files (the "Software"),
> - * to deal in the Software without restriction, including without limitation
> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> - * and/or sell copies of the Software, and to permit persons to whom the
> - * Software is furnished to do so, subject to the following conditions:
> - *
> - * The above copyright notice and this permission notice (including the next
> - * paragraph) shall be included in all copies or substantial portions of the
> - * Software.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR

This talks about VA Linux Systems and/or its suppliers, while the MIT
licence talks about authors or copyright holders.

Are such transformations OK to just do?

  -ilia

> - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> - * OTHER DEALINGS IN THE SOFTWARE.
>   */
>
>  #include <linux/highmem.h>
> --
> 1.8.3.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] gpu/drm_memory: fix a few warnings
  2019-07-08 19:21 ` Ilia Mirkin
@ 2019-07-08 19:41   ` Qian Cai
  2019-07-08 19:57     ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Qian Cai @ 2019-07-08 19:41 UTC (permalink / raw)
  To: Ilia Mirkin
  Cc: Andrew Morton, David Airlie, Daniel Vetter, Maarten Lankhorst,
	Sean Paul, joe, linux-spdx, dri-devel, LKML, rfontana, tglx,
	torvalds, corbet, gregkh

On Mon, 2019-07-08 at 15:21 -0400, Ilia Mirkin wrote:
> On Mon, Jul 8, 2019 at 2:06 PM Qian Cai <cai@lca.pw> wrote:
> > 
> > The opening comment mark "/**" is reserved for kernel-doc comments, so
> > it will generate a warning with "make W=1".
> > 
> > drivers/gpu/drm/drm_memory.c:2: warning: Cannot understand  * \file
> > drm_memory.c
> > 
> > Also, silence a checkpatch warning by adding a license identfiter where
> > it indicates the MIT license further down in the source file.
> > 
> > WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
> > 
> > It becomes redundant to add both an SPDX identifier and have a
> > description of the license in the comment block at the top, so remove
> > the later.
> > 
> > Signed-off-by: Qian Cai <cai@lca.pw>
> > ---
> > 
> > v2: remove the redundant description of the license.
> > 
> >  drivers/gpu/drm/drm_memory.c | 22 ++--------------------
> >  1 file changed, 2 insertions(+), 20 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
> > index 132fef8ff1b6..86a11fc8e954 100644
> > --- a/drivers/gpu/drm/drm_memory.c
> > +++ b/drivers/gpu/drm/drm_memory.c
> > @@ -1,4 +1,5 @@
> > -/**
> > +// SPDX-License-Identifier: MIT
> > +/*
> >   * \file drm_memory.c
> >   * Memory management wrappers for DRM
> >   *
> > @@ -12,25 +13,6 @@
> >   * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> >   * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
> >   * All Rights Reserved.
> > - *
> > - * Permission is hereby granted, free of charge, to any person obtaining a
> > - * copy of this software and associated documentation files (the
> > "Software"),
> > - * to deal in the Software without restriction, including without
> > limitation
> > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > - * and/or sell copies of the Software, and to permit persons to whom the
> > - * Software is furnished to do so, subject to the following conditions:
> > - *
> > - * The above copyright notice and this permission notice (including the
> > next
> > - * paragraph) shall be included in all copies or substantial portions of
> > the
> > - * Software.
> > - *
> > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > OR
> > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES
> > OR
> 
> This talks about VA Linux Systems and/or its suppliers, while the MIT
> licence talks about authors or copyright holders.
> 
> Are such transformations OK to just do?

From,

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Document
ation/process/license-rules.rst

"The Linux kernel requires the precise SPDX identifier in all source files."

That is the closest license I can think of.

Anyway, I have added a few people who may know better of the licensing.

> 
>   -ilia
> 
> > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > - * OTHER DEALINGS IN THE SOFTWARE.
> >   */
> > 
> >  #include <linux/highmem.h>
> > --
> > 1.8.3.1
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] gpu/drm_memory: fix a few warnings
  2019-07-08 19:41   ` Qian Cai
@ 2019-07-08 19:57     ` Thomas Gleixner
  2019-07-10  3:42       ` J Lovejoy
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2019-07-08 19:57 UTC (permalink / raw)
  To: Qian Cai
  Cc: Ilia Mirkin, Andrew Morton, David Airlie, Daniel Vetter,
	Maarten Lankhorst, Sean Paul, joe, linux-spdx, dri-devel, LKML,
	rfontana, Linus Torvalds, Jonathan Corbet, Greg KH

[-- Attachment #1: Type: text/plain, Size: 2557 bytes --]

On Mon, 8 Jul 2019, Qian Cai wrote:
> On Mon, 2019-07-08 at 15:21 -0400, Ilia Mirkin wrote:
> > > -/**
> > > +// SPDX-License-Identifier: MIT
> > > +/*
> > >   * \file drm_memory.c
> > >   * Memory management wrappers for DRM
> > >   *
> > > @@ -12,25 +13,6 @@
> > >   * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
> > >   * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
> > >   * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the
> > > "Software"),
> > > - * to deal in the Software without restriction, including without
> > > limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the
> > > next
> > > - * paragraph) shall be included in all copies or substantial portions of
> > > the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > > OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES
> > > OR
> > 
> > This talks about VA Linux Systems and/or its suppliers, while the MIT
> > licence talks about authors or copyright holders.

That's looks lika a valid substitution and does not change the meaning of
the license, AFAICT. Richard might have a differnt opinion though.
 
> > Are such transformations OK to just do?

Nope.

> From,
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Document
> ation/process/license-rules.rst
> 
> "The Linux kernel requires the precise SPDX identifier in all source files."

That's correct.
 
> That is the closest license I can think of.

Well, it's pretty much plain MIT, but you might have noticed:

 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.

So in this case, you need to talk to the copyright holder if he agrees to
remove the boiler plate language.

Adding the MIT SPDX identifier without touching the boiler plate is fine.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] gpu/drm_memory: fix a few warnings
  2019-07-08 19:57     ` Thomas Gleixner
@ 2019-07-10  3:42       ` J Lovejoy
  0 siblings, 0 replies; 5+ messages in thread
From: J Lovejoy @ 2019-07-10  3:42 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Qian Cai, Ilia Mirkin, Andrew Morton, David Airlie,
	Daniel Vetter, Maarten Lankhorst, Sean Paul, joe, linux-spdx,
	dri-devel, LKML, rfontana, Linus Torvalds, Jonathan Corbet,
	Greg KH



> On Jul 8, 2019, at 1:57 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> On Mon, 8 Jul 2019, Qian Cai wrote:
>> On Mon, 2019-07-08 at 15:21 -0400, Ilia Mirkin wrote:
>>>> -/**
>>>> +// SPDX-License-Identifier: MIT
>>>> +/*
>>>>   * \file drm_memory.c
>>>>   * Memory management wrappers for DRM
>>>>   *
>>>> @@ -12,25 +13,6 @@
>>>>   * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
>>>>   * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
>>>>   * All Rights Reserved.
>>>> - *
>>>> - * Permission is hereby granted, free of charge, to any person obtaining a
>>>> - * copy of this software and associated documentation files (the
>>>> "Software"),
>>>> - * to deal in the Software without restriction, including without
>>>> limitation
>>>> - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
>>>> - * and/or sell copies of the Software, and to permit persons to whom the
>>>> - * Software is furnished to do so, subject to the following conditions:
>>>> - *
>>>> - * The above copyright notice and this permission notice (including the
>>>> next
>>>> - * paragraph) shall be included in all copies or substantial portions of
>>>> the
>>>> - * Software.
>>>> - *
>>>> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
>>>> OR
>>>> - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>>>> - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
>>>> - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES
>>>> OR
>>> 
>>> This talks about VA Linux Systems and/or its suppliers, while the MIT
>>> licence talks about authors or copyright holders.
> 
> That's looks lika a valid substitution and does not change the meaning of
> the license, AFAICT. 

As of the 3.6 release of the SPDX License List, we will have added markup to denote that the name in the disclaimer can be changed and still considered a match. This is a common scenario in other licenses (like the BSD family), but I don’t think we’d come across it until the work on the kernel and adding SPDX identifiers. So, yes, MIT would be the correct SPDX identifier here as of 3.6 (which will be posted in a few days).

For reference, the SPDX License List matching guidelines can be found here: https://spdx.org/spdx-license-list/matching-guidelines - see Guideline 2.1.3 specifically. Replaceable text is marked up in the master files that comprise the SPDX License List according the the XML schema and then displayed in color coded text on the website pages (see, for example, BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html

Of course, if anyone finds any other license text that deserves this kind of accommodation, you can always make a PR here: https://github.com/spdx/license-list-XML :)

thanks,
Jilayne
SPDX legal team co-lead

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 18:05 [PATCH v2] gpu/drm_memory: fix a few warnings Qian Cai
2019-07-08 19:21 ` Ilia Mirkin
2019-07-08 19:41   ` Qian Cai
2019-07-08 19:57     ` Thomas Gleixner
2019-07-10  3:42       ` J Lovejoy

Linux-SPDX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spdx/0 linux-spdx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spdx linux-spdx/ https://lore.kernel.org/linux-spdx \
		linux-spdx@vger.kernel.org linux-spdx@archiver.kernel.org
	public-inbox-index linux-spdx


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spdx


AGPL code for this site: git clone https://public-inbox.org/ public-inbox