2018-10-08 14:14:52

by Loic Tourlonias

[permalink] [raw]
Subject: [PATCH v2] staging: erofs: add SPDX identifer

Add SPDX identifier to simplify header and remove whole license text

v1 -> v2:

Move SPDX identifier to first line and change comment delimiter

Signed-off-by: Loic Tourlonias <[email protected]>
---
drivers/staging/erofs/lz4defs.h | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/erofs/lz4defs.h b/drivers/staging/erofs/lz4defs.h
index 00a0b58a0871..cdacc57e6a08 100644
--- a/drivers/staging/erofs/lz4defs.h
+++ b/drivers/staging/erofs/lz4defs.h
@@ -1,32 +1,12 @@
+/* SPDX-License-Identifier: BSD-2-Clause*/
#ifndef __LZ4DEFS_H__
#define __LZ4DEFS_H__
-
/*
* lz4defs.h -- common and architecture specific defines for the kernel usage

* LZ4 - Fast LZ compression algorithm
* Copyright (C) 2011-2016, Yann Collet.
- * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
* You can contact the author at :
* - LZ4 homepage : http://www.lz4.org
* - LZ4 source repository : https://github.com/lz4/lz4
--
2.17.1



2018-10-08 14:24:18

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer

On Mon, Oct 08, 2018 at 04:14:09PM +0200, Loic Tourlonias wrote:
> Add SPDX identifier to simplify header and remove whole license text
>
> v1 -> v2:
>
> Move SPDX identifier to first line and change comment delimiter

The "changes" need to go below the --- line.

>
> Signed-off-by: Loic Tourlonias <[email protected]>
> ---
> drivers/staging/erofs/lz4defs.h | 24 ++----------------------
> 1 file changed, 2 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/erofs/lz4defs.h b/drivers/staging/erofs/lz4defs.h
> index 00a0b58a0871..cdacc57e6a08 100644
> --- a/drivers/staging/erofs/lz4defs.h
> +++ b/drivers/staging/erofs/lz4defs.h
> @@ -1,32 +1,12 @@
> +/* SPDX-License-Identifier: BSD-2-Clause*/
> #ifndef __LZ4DEFS_H__
> #define __LZ4DEFS_H__
> -
> /*

Why delete that line?

But wait, why do we even have this file at all? What's wrong with the
lib/lz4/ code that we have in the kernel today? Shouldn't the code
using these files be moved over to use the lib/ code instead and this
file be deleted?

thanks,

greg k-h

2018-10-08 14:37:32

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer

Hi Greg,

On 2018/10/8 22:22, Greg Kroah-Hartman wrote:
> Why delete that line?
>
> But wait, why do we even have this file at all? What's wrong with the
> lib/lz4/ code that we have in the kernel today? Shouldn't the code
> using these files be moved over to use the lib/ code instead and this
> file be deleted?

EROFS uses customized LZ4 decompression code for now (which has been offically
supported in lz4 1.8.3, I have updated it in
https://ozlabs.org/~akpm/mmots/broken-out/lib-lz4-update-lz4-decompressor-module.patch
if it is shown up in Linux 4.20, I will remove all the customized LZ4 decompression code),
but lib/ code lz4def.h isn't export to include/.

Thanks,
Gao Xiang

>
> thanks,
>
> greg k-h

2018-10-08 14:44:11

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer



On 2018/10/8 22:36, Gao Xiang wrote:
> Hi Greg,
>
> On 2018/10/8 22:22, Greg Kroah-Hartman wrote:
>> Why delete that line?
>>
>> But wait, why do we even have this file at all? What's wrong with the
>> lib/lz4/ code that we have in the kernel today? Shouldn't the code
>> using these files be moved over to use the lib/ code instead and this
>> file be deleted?
>
> EROFS uses customized LZ4 decompression code for now (which has been offically
> supported in lz4 1.8.3, I have updated it in
> https://ozlabs.org/~akpm/mmots/broken-out/lib-lz4-update-lz4-decompressor-module.patch
> if it is shown up in Linux 4.20, I will remove all the customized LZ4 decompression code),
> but lib/ code lz4def.h isn't export to include/.

Please refer to https://github.com/lz4/lz4/issues/566 for more details the reason why
EROFS uses the different implementation rather than the current lib/lz4/ code in the kernel today
(it will be changed in the next Linux version if the updated code works fine.)

Thanks,
Gao Xiang

>
> Thanks,
> Gao Xiang
>
>>
>> thanks,
>>
>> greg k-h

2018-10-08 14:44:15

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer

On Mon, Oct 08, 2018 at 10:36:39PM +0800, Gao Xiang wrote:
> Hi Greg,
>
> On 2018/10/8 22:22, Greg Kroah-Hartman wrote:
> > Why delete that line?
> >
> > But wait, why do we even have this file at all? What's wrong with the
> > lib/lz4/ code that we have in the kernel today? Shouldn't the code
> > using these files be moved over to use the lib/ code instead and this
> > file be deleted?
>
> EROFS uses customized LZ4 decompression code for now (which has been offically
> supported in lz4 1.8.3, I have updated it in
> https://ozlabs.org/~akpm/mmots/broken-out/lib-lz4-update-lz4-decompressor-module.patch
> if it is shown up in Linux 4.20, I will remove all the customized LZ4 decompression code),
> but lib/ code lz4def.h isn't export to include/.

It should show up in 4.20, so you should be able to remove this all
then.

thanks,

greg k-h

2018-10-08 14:49:50

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer

Hi Greg,

On 2018/10/8 22:43, Greg Kroah-Hartman wrote:
> On Mon, Oct 08, 2018 at 10:36:39PM +0800, Gao Xiang wrote:
>> Hi Greg,
>>
>> On 2018/10/8 22:22, Greg Kroah-Hartman wrote:
>>> Why delete that line?
>>>
>>> But wait, why do we even have this file at all? What's wrong with the
>>> lib/lz4/ code that we have in the kernel today? Shouldn't the code
>>> using these files be moved over to use the lib/ code instead and this
>>> file be deleted?
>>
>> EROFS uses customized LZ4 decompression code for now (which has been offically
>> supported in lz4 1.8.3, I have updated it in
>> https://ozlabs.org/~akpm/mmots/broken-out/lib-lz4-update-lz4-decompressor-module.patch
>> if it is shown up in Linux 4.20, I will remove all the customized LZ4 decompression code),
>> but lib/ code lz4def.h isn't export to include/.
>
> It should show up in 4.20, so you should be able to remove this all
> then.

Yes, that is correct. I will fix it in 4.20 if the updated LZ4 is already there. :)

Thanks,
Gao Xiang

>
> thanks,
>
> greg k-h
>

2018-10-08 14:58:03

by loïc tourlonias

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer

Hi Gao,
On Mon, Oct 8, 2018 at 4:48 PM Gao Xiang <[email protected]> wrote:
>
> Hi Greg,
>
> On 2018/10/8 22:43, Greg Kroah-Hartman wrote:
> > On Mon, Oct 08, 2018 at 10:36:39PM +0800, Gao Xiang wrote:
> >> Hi Greg,
> >>
> >> On 2018/10/8 22:22, Greg Kroah-Hartman wrote:
> >>> Why delete that line?
> >>>
> >>> But wait, why do we even have this file at all? What's wrong with the
> >>> lib/lz4/ code that we have in the kernel today? Shouldn't the code
> >>> using these files be moved over to use the lib/ code instead and this
> >>> file be deleted?
> >>
> >> EROFS uses customized LZ4 decompression code for now (which has been offically
> >> supported in lz4 1.8.3, I have updated it in
> >> https://ozlabs.org/~akpm/mmots/broken-out/lib-lz4-update-lz4-decompressor-module.patch
> >> if it is shown up in Linux 4.20, I will remove all the customized LZ4 decompression code),
> >> but lib/ code lz4def.h isn't export to include/.
> >
> > It should show up in 4.20, so you should be able to remove this all
> > then.
>
> Yes, that is correct. I will fix it in 4.20 if the updated LZ4 is already there. :)

So no need to update the patch since the file will be removed. Am I correct?

Too bad, I'll make my first patch later... ^^

Thanks
Loic
>
> Thanks,
> Gao Xiang
>
> >
> > thanks,
> >
> > greg k-h
> >

2018-10-08 15:02:58

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH v2] staging: erofs: add SPDX identifer

Hi Loic,

On 2018/10/8 23:00, loïc tourlonias wrote:
> Hi Gao,
> On Mon, Oct 8, 2018 at 4:48 PM Gao Xiang <[email protected]> wrote:
>>
>> Hi Greg,
>>
>> On 2018/10/8 22:43, Greg Kroah-Hartman wrote:
>>> On Mon, Oct 08, 2018 at 10:36:39PM +0800, Gao Xiang wrote:
>>>> Hi Greg,
>>>>
>>>> On 2018/10/8 22:22, Greg Kroah-Hartman wrote:
>>>>> Why delete that line?
>>>>>
>>>>> But wait, why do we even have this file at all? What's wrong with the
>>>>> lib/lz4/ code that we have in the kernel today? Shouldn't the code
>>>>> using these files be moved over to use the lib/ code instead and this
>>>>> file be deleted?
>>>>
>>>> EROFS uses customized LZ4 decompression code for now (which has been offically
>>>> supported in lz4 1.8.3, I have updated it in
>>>> https://ozlabs.org/~akpm/mmots/broken-out/lib-lz4-update-lz4-decompressor-module.patch
>>>> if it is shown up in Linux 4.20, I will remove all the customized LZ4 decompression code),
>>>> but lib/ code lz4def.h isn't export to include/.
>>>
>>> It should show up in 4.20, so you should be able to remove this all
>>> then.
>>
>> Yes, that is correct. I will fix it in 4.20 if the updated LZ4 is already there. :)
>
> So no need to update the patch since the file will be removed. Am I correct?
>
> Too bad, I'll make my first patch later... ^^

I think you could make the patch if you want :)
It is up to Greg whether take this patch or not since it is actually a cleanup attempt.

I will also do more cleanups beside my current work, yet EROFS is now busy in productization.

Thanks,
Gao Xiang

>
> Thanks
> Loic
>>
>> Thanks,
>> Gao Xiang
>>
>>>
>>> thanks,
>>>
>>> greg k-h
>>>