[v2,6/8] pwm: cros-ec: Switch to SPDX identifier.

Message ID 20180605175429.9072-7-enric.balletbo@collabora.com
State Accepted
Headers show
Series
  • cros_ec: Switch to SPDX identifier.
Related show

Commit Message

Enric Balletbo i Serra June 5, 2018, 5:54 p.m.
Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

Changes in v2: None

 drivers/pwm/pwm-cros-ec.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Comments

Thierry Reding June 6, 2018, 9:08 a.m. | #1
On Tue, Jun 05, 2018 at 07:54:27PM +0200, Enric Balletbo i Serra wrote:
> Adopt the SPDX license identifier headers to ease license compliance
> management.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
> Changes in v2: None
> 
>  drivers/pwm/pwm-cros-ec.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
> index 9c13694eaa24..9bf4cde86765 100644
> --- a/drivers/pwm/pwm-cros-ec.c
> +++ b/drivers/pwm/pwm-cros-ec.c
> @@ -1,12 +1,7 @@
> -/*
> - * Copyright (C) 2016 Google, Inc
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License version 2, as published by
> - * the Free Software Foundation.
> - *
> - * Expose a PWM controlled by the ChromeOS EC to the host processor.
> - */
> +// SPDX-License-Identifier: GPL-2.0
> +// Expose a PWM controlled by the ChromeOS EC to the host processor.
> +//
> +// Copyright (C) 2016 Google, Inc.

This is odd. I understand that for some reason there is an exception for
SPDX license identifies to use C++ style comments, but why would you
make the whole comment C++ style? Why not just something like the below:

+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2016 Google, Inc
  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2, as published by
- * the Free Software Foundation.
- *
  * Expose a PWM controlled by the ChromeOS EC to the host processor.
  */

Thierry
Enric Balletbo i Serra June 6, 2018, 9:21 a.m. | #2
Hi Thierry,

On 06/06/18 11:08, Thierry Reding wrote:
> On Tue, Jun 05, 2018 at 07:54:27PM +0200, Enric Balletbo i Serra wrote:
>> Adopt the SPDX license identifier headers to ease license compliance
>> management.
>>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>>
>> Changes in v2: None
>>
>>  drivers/pwm/pwm-cros-ec.c | 13 ++++---------
>>  1 file changed, 4 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
>> index 9c13694eaa24..9bf4cde86765 100644
>> --- a/drivers/pwm/pwm-cros-ec.c
>> +++ b/drivers/pwm/pwm-cros-ec.c
>> @@ -1,12 +1,7 @@
>> -/*
>> - * Copyright (C) 2016 Google, Inc
>> - *
>> - * This program is free software; you can redistribute it and/or modify it
>> - * under the terms of the GNU General Public License version 2, as published by
>> - * the Free Software Foundation.
>> - *
>> - * Expose a PWM controlled by the ChromeOS EC to the host processor.
>> - */
>> +// SPDX-License-Identifier: GPL-2.0
>> +// Expose a PWM controlled by the ChromeOS EC to the host processor.
>> +//
>> +// Copyright (C) 2016 Google, Inc.
> 
> This is odd. I understand that for some reason there is an exception for
> SPDX license identifies to use C++ style comments, but why would you
> make the whole comment C++ style? Why not just something like the below:
> 

Seems that there is some kind of controversy between different maintainers. I
did in that way because I was complained to use the c-style on other patches,
and seems, that putting everything as // is Linus Torvalds' preferred style:

https://lkml.org/lkml/2017/11/25/133

I don't mind to change if the c-style is preferred by the maintainer (others
prefer the c++ style) but I think that would be good get an agreement between
subsystems maintainers and document properly.

Best regards,
 Enric

> +// SPDX-License-Identifier: GPL-2.0
>  /*
>   * Copyright (C) 2016 Google, Inc
>   *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License version 2, as published by
> - * the Free Software Foundation.
> - *
>   * Expose a PWM controlled by the ChromeOS EC to the host processor.
>   */
> 
> Thierry
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding June 6, 2018, 9:43 a.m. | #3
On Wed, Jun 06, 2018 at 11:21:01AM +0200, Enric Balletbo i Serra wrote:
> Hi Thierry,
> 
> On 06/06/18 11:08, Thierry Reding wrote:
> > On Tue, Jun 05, 2018 at 07:54:27PM +0200, Enric Balletbo i Serra wrote:
> >> Adopt the SPDX license identifier headers to ease license compliance
> >> management.
> >>
> >> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> >> ---
> >>
> >> Changes in v2: None
> >>
> >>  drivers/pwm/pwm-cros-ec.c | 13 ++++---------
> >>  1 file changed, 4 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
> >> index 9c13694eaa24..9bf4cde86765 100644
> >> --- a/drivers/pwm/pwm-cros-ec.c
> >> +++ b/drivers/pwm/pwm-cros-ec.c
> >> @@ -1,12 +1,7 @@
> >> -/*
> >> - * Copyright (C) 2016 Google, Inc
> >> - *
> >> - * This program is free software; you can redistribute it and/or modify it
> >> - * under the terms of the GNU General Public License version 2, as published by
> >> - * the Free Software Foundation.
> >> - *
> >> - * Expose a PWM controlled by the ChromeOS EC to the host processor.
> >> - */
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +// Expose a PWM controlled by the ChromeOS EC to the host processor.
> >> +//
> >> +// Copyright (C) 2016 Google, Inc.
> > 
> > This is odd. I understand that for some reason there is an exception for
> > SPDX license identifies to use C++ style comments, but why would you
> > make the whole comment C++ style? Why not just something like the below:
> > 
> 
> Seems that there is some kind of controversy between different maintainers. I
> did in that way because I was complained to use the c-style on other patches,
> and seems, that putting everything as // is Linus Torvalds' preferred style:
> 
> https://lkml.org/lkml/2017/11/25/133
> 
> I don't mind to change if the c-style is preferred by the maintainer (others
> prefer the c++ style) but I think that would be good get an agreement between
> subsystems maintainers and document properly.

I've read elsewhere that using // for SPDX was supposed to make it stand
out, which is kind of contradicted by the above. However, I interpret
Linus' reply to Mauro as "people tend to do less crazy things with //
than with /* */", so to me it seems that as long you use /* */ sensibly,
there's no reason to avoid it.

No need to resend, though, I can adjust the patch to my own preference
if I decide to do so.

Thierry
Thierry Reding July 9, 2018, 5:02 p.m. | #4
On Tue, Jun 05, 2018 at 07:54:27PM +0200, Enric Balletbo i Serra wrote:
> Adopt the SPDX license identifier headers to ease license compliance
> management.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
> 
> Changes in v2: None
> 
>  drivers/pwm/pwm-cros-ec.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)

Applied, thanks.

Thierry

Patch

diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
index 9c13694eaa24..9bf4cde86765 100644
--- a/drivers/pwm/pwm-cros-ec.c
+++ b/drivers/pwm/pwm-cros-ec.c
@@ -1,12 +1,7 @@ 
-/*
- * Copyright (C) 2016 Google, Inc
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2, as published by
- * the Free Software Foundation.
- *
- * Expose a PWM controlled by the ChromeOS EC to the host processor.
- */
+// SPDX-License-Identifier: GPL-2.0
+// Expose a PWM controlled by the ChromeOS EC to the host processor.
+//
+// Copyright (C) 2016 Google, Inc.
 
 #include <linux/module.h>
 #include <linux/mfd/cros_ec.h>