[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add SPDX to arch/arm/*.c


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 16 Aug 2022 07:32:17 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eGiGwUcULGuBmNzvtT11Xp+cYSLxlwnLgLpktrDTSEI=; b=XwLY9iBUnptkDfQ4Yd2Yg7kDC+nOF9wA7bZSEafl6FwsJULq3ew/BWbXJs5tsV9sVwLdb4JcH/fAg1shiXtqF0iaqgCHGpsK4PFXV5RGz6QbbctKv/0dv+qZHd9w3TRe6V5mksDQCnW5EQ7SaLgQJQRARB7LyZOnUuQ3rSUDo/UPX/1G+60TuPbaYCB/JSdSLKjqQQHX4DQdhF54HM/OA8X5nPMBUEk8I4zUM5aaSwxAXLukr/iT2N57kjTzVcvoknOH+83tE+rCvRI9MfShG2S2nmPf6u0DoMMvZrbaSpv7rmP33zOw0ZKPd8FGehSSu7mNzxKu+VoOJW7uKyqAMA==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eGiGwUcULGuBmNzvtT11Xp+cYSLxlwnLgLpktrDTSEI=; b=gJa+J7No3Ia/5brXcQckvOU6uyXfVuqew5gBoA/ZQO/W9lZVel6EelVpX0jz50V/kfaL82XLUHhoQ/KNVhATAK1iLr86x8aaJk49dFsYqkhn/7xCRRDMn0cNUJu1H3QaNzATrjP8jNNduOaH3+4NqRPZ/+9rBUb+C37rtOU+X6xQRsEggXamb47Ira47M4W23ioGXhgC9GddsyNXRGWQWTRbT3rmIxHnC/S1MGnWdv9zmiLtYZBsSOcMukJsWIUx41cFbbKlhUllrYaxOKh70+miHS4UyVUMzPX7xn1IRgGFR7epMPMkGSWOSj/NKUFQfouvbJQir9yqapx4afuKqw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Rk4xSC09Zrb1aMzpdqpcSaayhk0ShmzjjhY4GeF53yJESI50FOx910RETu5cC1xisXx2op/0ELOR6La/pOkAMsmVpP47aB2sqvlEX8ggbPGTn8bhpC8A1O99bWioYYjJ7+Av0KS7TYO//fTQNOXq3gAQ0KdRRFxNwJYQJBAQqELg5vcuXuPlczIxaZcLEd2JwmdAiKTFHAEx1oD6l0QO/hmtJyVZmab+JFm3ucoLchjmC9IrXyFJPI+t8vsIpx11jrtnAZ4Zb6CjO5H5xVdNBTKNo3ME8p8ixPttzPOb9L2BE2y6FgA6PuPeMQGDR209cePdzRexaeehT0Dc96PrbA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jmho0aDm3OpAawUnAbrzkk/slyRdF4YgZIcpw1x/1N9aPBQ8JrCWqGk4Sky/rZK7KNB11eDFaQaJAVeCoORouNxvGwuTRl+8HgcPPgAcNZMIT425j1/TdsoyDzkahxLAthDk11GFodlhFtxCIrlDmePRD8xsw4TpR/d1xEdSPTeuSIeRYwiL0gfXvLrN2wJrVPtP6Jgcj96DGndZiqHLaS3hqAl8bzA1W95k4BOuhvCb9nEpV8ZRfFHthBXJ5QbXfe4EvJZNU1QVULCrpK9T0owpT4dhcc661pLH6S+eRwFpffLQFBHacRWUQCObGI928+CTDswxpJFkTpT5UjxFVQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <julien@xxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 16 Aug 2022 07:32:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYrq/rjydG2NzoBE6skSmHVGc0Aq2seUCAgAP1yICAALg2AA==
  • Thread-topic: [PATCH] add SPDX to arch/arm/*.c

Hi Stefano,

> On 15 Aug 2022, at 21:32, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> + Xen maintainers and committers
> 
> 
> For context, I wrote a patch to introduce SPDX tags starting from
> arch/arm/*.c.
> 
> Julien rightfully pointed out that it should be added to our coding
> style. He is right. Also as I was reading his replies, I realized there
> are a couple of minor coding style things to agree as a group first.
> I'll highlighted them here and suggested a proposal. I am happy to go
> with the preference of the majority.
> 
> 
> ## comment format // vs /*
> 
> In this patch I used:
> // SPDX-License-Identifier: GPL-2.0
> 
> But our comment format is actually /* xxx */. I think it is fair to
> use /* xxx */ as Julien requested:
> 
> /* SPDX-License-Identifier: GPL-2.0 */
> 
> Unless there are any concerns, I'll change the patch to /* SPDX... */
> 

Agree

> 
> ## blank line after SPDX
> 
> In this series, I didn't add a blank line after the new SPDX comment, no
> matter if the following line was an #include or another comment. Now I am
> thinking it would be best to add a blank line, as follows:
> 
> ---
> /* SPDX-License-Identifier: GPL-2.0 */
> 
> #include <xen/bitops.h>
> ---
> 
> Or:
> 
> ---
> /* SPDX-License-Identifier: GPL-2.0 */
> 
> /*
> * xen/arch/arm/device.c
> *
> ---
> 
> Let me know if that's OK for you.

Agree.
Makes things clearer I think.

> 
> 
> ## Original copyright text
> 
> As we add the new SDPX tag, It makes sense to remove the older copyright
> text at the top of the file, e.g.:
> 
> diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
> index f03cd943c6..d0a409e4fd 100644
> --- a/xen/arch/arm/alternative.c
> +++ b/xen/arch/arm/alternative.c
> @@ -1,20 +1,10 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> /*
>  * alternative runtime patching
>  * inspired by the x86 version
>  *
>  * Copyright (C) 2014-2016 ARM Ltd.
> - *
> - * 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.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program.  If not, see <http://www.gnu.org/licenses/>.
>  */
> 
> #include <xen/init.h>
> 
> 
> Now the question is whether we want to keep what's left:
> 
> /*
> * alternative runtime patching
> * inspired by the x86 version
> *
> * Copyright (C) 2014-2016 ARM Ltd.
> */
> 
> The Copyright line is not useful and often stale. Also the other comment
> is not very interesting in most cases (I am referring to "alternative
> runtime patching inspired by the x86 version"), although I realize this
> is going to be a on case-by-case basis.
> 
> My suggestion is to get rid of it all unless useful (in most cases it is
> not useful), leading to:
> 
> 
> diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
> index f03cd943c6..e363176d1f 100644
> --- a/xen/arch/arm/alternative.c
> +++ b/xen/arch/arm/alternative.c
> @@ -1,21 +1,4 @@
> -/*
> - * alternative runtime patching
> - * inspired by the x86 version
> - *
> - * Copyright (C) 2014-2016 ARM Ltd.
> - *
> - * 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.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> - */
> +/* SPDX-License-Identifier: GPL-2.0 */
> 
> #include <xen/init.h>
> #include <xen/types.h>
> 
> 
> Do you guys agree?

Removing the copyright would probably require an agreement from the original 
implementer.
To prevent troubles and round of questions I would keep the comment and 
copyright for now.

Cheers
Bertrand

> 
> 
> Cheers,
> 
> Stefano
> 
> 
> P.S.
> Julien, I'll reply to your other points separately to avoid confusion.
> 
> 
> On Sat, 13 Aug 2022, Julien Grall wrote:
>> Hi Stefano,
>> 
>> On 13/08/2022 01:59, Stefano Stabellini wrote:
>>> Add SPDX license information to all the *.c files under arch/arm.
>>> 
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>> ---
>>> 
>>> We need to start from somewhere and I thought arch/arm/*.c would be a
>>> good place to start.
>> 
>> Thanks for doing it. This will make easier to understand the license in each
>> file. There are a couple of places below where the SDPX tag is incorrect. How
>> did you figure out the which license to use?
>> 
>> Also, I think we should consider to add a section about SPDX in our coding
>> style so new files are using it. So we don't end up with a mix in arch/arm/*.
>> 
>>> 
>>> diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
>>> index f03cd943c6..8115f89408 100644
>>> --- a/xen/arch/arm/alternative.c
>>> +++ b/xen/arch/arm/alternative.c
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>> 
>> Technically, this is a comment. So this should be /* ... */ to follow Xen
>> coding style. Also...
>> 
>>>  /*
>>>   * alternative runtime patching
>>>   * inspired by the x86 version
>> 
>> ... this comment contains information about the license. As you add the SPDX,
>> the "long" version should be removed. This would also make easier to verify
>> the SPDX you add match existing license.
>> 
>>> diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
>>> index ec81a45de9..7c986ecb18 100644
>>> --- a/xen/arch/arm/bootfdt.c
>>> +++ b/xen/arch/arm/bootfdt.c
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>>  /*
>>>   * Early Device Tree
>>>   *
>>> diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
>>> index ae649d16ef..887b5426c7 100644
>>> --- a/xen/arch/arm/cpuerrata.c
>>> +++ b/xen/arch/arm/cpuerrata.c
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>> 
>> This file had no explicit license. I had a look at the 'git log' and AFAICT
>> this was either new code and came from Linux. So this looks fine to add GPLv2
>> here.
>> 
>>>  #include <xen/cpu.h>
>>>  #include <xen/cpumask.h>
>>>  #include <xen/init.h>
>>> diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
>>> index 62d5e1770a..a6253cb57f 100644
>>> --- a/xen/arch/arm/cpufeature.c
>>> +++ b/xen/arch/arm/cpufeature.c
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>>  /*
>>>   * Contains CPU feature definitions
>>>   *
>>> diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
>>> index f5f6562600..f586c3d781 100644
>>> --- a/xen/arch/arm/decode.c
>>> +++ b/xen/arch/arm/decode.c
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>> 
>> This tag doesn't match the license below. It is currently GPLv2+. I don't
>> think you can change it without consulting the author. But if it is, then it
>> should be mentioned in the commit message.
>> 
>> I remember we discussed in the past that some files were GPLv2+. But I can't
>> remember what was the outcome (I can't find the thread). IIRC GPLv2+ is a lot
>> more restrictive than GPLv2 and could prevent some companies to contribute.
>> 
>> [...]
>> 
>>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>>> index 2cd481979c..1a2dac95a9 100644
>>> --- a/xen/arch/arm/domain.c
>>> +++ b/xen/arch/arm/domain.c
>>> @@ -1,3 +1,4 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>> 
>> Same here about GPLv2+. Please go through the rest of the files to confirm 
>> the
>> license.
>> 
>> Cheers,
>> 
>> -- 
>> Julien Grall
>> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.