diff mbox

[1/2] staging: android: ion: Fix license identifier comment format

Message ID 20180507011854.12627-1-natechancellor@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nathan Chancellor May 7, 2018, 1:18 a.m. UTC
checkpatch.pl complains these are invalid because the rules in
Documentation/process/license-rules.rst state that C headers should
have "/* */" style comments.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/staging/android/ion/ion.h  | 2 +-
 drivers/staging/android/uapi/ion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Laura Abbott May 7, 2018, 1:37 p.m. UTC | #1
On 05/06/2018 06:18 PM, Nathan Chancellor wrote:
> checkpatch.pl complains these are invalid because the rules in
> Documentation/process/license-rules.rst state that C headers should
> have "/* */" style comments.
> 

The SPDX markings are special, but I don't see anything from a
quick read of the SPDX specification that says they have to use //.
I think this is going to generate a lot of possible noise so it
might be worth adjusting checkpatch.

Thanks,
Laura

> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>   drivers/staging/android/ion/ion.h  | 2 +-
>   drivers/staging/android/uapi/ion.h | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h
> index ea0897812780..16cbd38a7160 100644
> --- a/drivers/staging/android/ion/ion.h
> +++ b/drivers/staging/android/ion/ion.h
> @@ -1,4 +1,4 @@
> -// SPDX-License-Identifier: GPL-2.0
> +/* SPDX-License-Identifier: GPL-2.0 */
>   /*
>    * drivers/staging/android/ion/ion.h
>    *
> diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
> index 825d3e95ccd3..5d7009884c13 100644
> --- a/drivers/staging/android/uapi/ion.h
> +++ b/drivers/staging/android/uapi/ion.h
> @@ -1,4 +1,4 @@
> -// SPDX-License-Identifier: GPL-2.0
> +/* SPDX-License-Identifier: GPL-2.0 */
>   /*
>    * drivers/staging/android/uapi/ion.h
>    *
>
Nathan Chancellor May 7, 2018, 2:40 p.m. UTC | #2
On Mon, May 07, 2018 at 06:37:52AM -0700, Laura Abbott wrote:
> On 05/06/2018 06:18 PM, Nathan Chancellor wrote:
> > checkpatch.pl complains these are invalid because the rules in
> > Documentation/process/license-rules.rst state that C headers should
> > have "/* */" style comments.
> > 
> 
> The SPDX markings are special, but I don't see anything from a
> quick read of the SPDX specification that says they have to use //.
> I think this is going to generate a lot of possible noise so it
> might be worth adjusting checkpatch.
> 
> Thanks,
> Laura

Under section 2 of "License identifier syntax" in the license rules
file, it shows the preferred style for each type of file. Apparently
there was some build breakage with // in header files so I assume they
want /* */ for uniformity sake.

Thanks!
Nathan

> 
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> >   drivers/staging/android/ion/ion.h  | 2 +-
> >   drivers/staging/android/uapi/ion.h | 2 +-
> >   2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h
> > index ea0897812780..16cbd38a7160 100644
> > --- a/drivers/staging/android/ion/ion.h
> > +++ b/drivers/staging/android/ion/ion.h
> > @@ -1,4 +1,4 @@
> > -// SPDX-License-Identifier: GPL-2.0
> > +/* SPDX-License-Identifier: GPL-2.0 */
> >   /*
> >    * drivers/staging/android/ion/ion.h
> >    *
> > diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
> > index 825d3e95ccd3..5d7009884c13 100644
> > --- a/drivers/staging/android/uapi/ion.h
> > +++ b/drivers/staging/android/uapi/ion.h
> > @@ -1,4 +1,4 @@
> > -// SPDX-License-Identifier: GPL-2.0
> > +/* SPDX-License-Identifier: GPL-2.0 */
> >   /*
> >    * drivers/staging/android/uapi/ion.h
> >    *
> > 
>
Laura Abbott May 7, 2018, 4:34 p.m. UTC | #3
On 05/07/2018 07:40 AM, Nathan Chancellor wrote:
> On Mon, May 07, 2018 at 06:37:52AM -0700, Laura Abbott wrote:
>> On 05/06/2018 06:18 PM, Nathan Chancellor wrote:
>>> checkpatch.pl complains these are invalid because the rules in
>>> Documentation/process/license-rules.rst state that C headers should
>>> have "/* */" style comments.
>>>
>>
>> The SPDX markings are special, but I don't see anything from a
>> quick read of the SPDX specification that says they have to use //.
>> I think this is going to generate a lot of possible noise so it
>> might be worth adjusting checkpatch.
>>
>> Thanks,
>> Laura
> 
> Under section 2 of "License identifier syntax" in the license rules
> file, it shows the preferred style for each type of file. Apparently
> there was some build breakage with // in header files so I assume they
> want /* */ for uniformity sake.
> 
> Thanks!
> Nathan
> 

Ah thanks for pointing me to that. I parsed your commit text completely
wrong. My biggest concern is being consistent and not breaking anything
so assuming this patch aligns with that:

Acked-by: Laura Abbott <labbott@redhat.com>

>>
>>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>>> ---
>>>    drivers/staging/android/ion/ion.h  | 2 +-
>>>    drivers/staging/android/uapi/ion.h | 2 +-
>>>    2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h
>>> index ea0897812780..16cbd38a7160 100644
>>> --- a/drivers/staging/android/ion/ion.h
>>> +++ b/drivers/staging/android/ion/ion.h
>>> @@ -1,4 +1,4 @@
>>> -// SPDX-License-Identifier: GPL-2.0
>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>>    /*
>>>     * drivers/staging/android/ion/ion.h
>>>     *
>>> diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
>>> index 825d3e95ccd3..5d7009884c13 100644
>>> --- a/drivers/staging/android/uapi/ion.h
>>> +++ b/drivers/staging/android/uapi/ion.h
>>> @@ -1,4 +1,4 @@
>>> -// SPDX-License-Identifier: GPL-2.0
>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>>    /*
>>>     * drivers/staging/android/uapi/ion.h
>>>     *
>>>
>>
diff mbox

Patch

diff --git a/drivers/staging/android/ion/ion.h b/drivers/staging/android/ion/ion.h
index ea0897812780..16cbd38a7160 100644
--- a/drivers/staging/android/ion/ion.h
+++ b/drivers/staging/android/ion/ion.h
@@ -1,4 +1,4 @@ 
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * drivers/staging/android/ion/ion.h
  *
diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h
index 825d3e95ccd3..5d7009884c13 100644
--- a/drivers/staging/android/uapi/ion.h
+++ b/drivers/staging/android/uapi/ion.h
@@ -1,4 +1,4 @@ 
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * drivers/staging/android/uapi/ion.h
  *