Skip to contentSkip to conversation

staging: android: ion: Fix license identifier comment format

PATCH In review Nathan Chancellor 2 participants 6 messages May 7, 2018 Staging

lore
Share & tools
lore
#0 lore raw

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

checkpatch.pl complains these are invalid because the rules in Documentation/process/license-rules.rst state that C headers should have "/* */" style comments.

---
 drivers/staging/android/ion/ion.h  | 2 +-
 drivers/staging/android/uapi/ion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.h +1 -1
index ea0897812780..16cbd38a7160 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * drivers/staging/android/ion/ion.h
  *
drivers/staging/android/uapi/ion.h +1 -1
index 825d3e95ccd3..5d7009884c13 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * drivers/staging/android/uapi/ion.h
  *
Signature · 1 line
2.17.0
#1 lore raw

PATCH 2/2 staging: android: ion: Remove unnecessary blank line

Fixes a checkpatch.pl warning.

---
 drivers/staging/android/ion/ion.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/android/ion/ion.c +0 -1
index 269a431646be..d10b60fe4a29 100644
@@ -95,7 +95,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
 		goto err1;
 	}
 
-
 	INIT_LIST_HEAD(&buffer->attachments);
 	mutex_init(&buffer->lock);
 	mutex_lock(&dev->buffer_lock);
Signature · 1 line
2.17.0
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] staging: android: ion: Remove unnecessary blank line

Quoted 13 lines · Nathan Chancellor

Fixes a checkpatch.pl warning.

---
  drivers/staging/android/ion/ion.c | 1 -
  1 file changed, 1 deletion(-)
drivers/staging/android/ion/ion.c +0 -0
index 269a431646be..d10b60fe4a29 100644

drivers/staging/android/ion/ion.c static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, · line 100

Quoted 7 lines
drivers/staging/android/ion/ion.c +0 -1
@@ -95,7 +95,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
  		goto err1;
  	}
 
-
  	INIT_LIST_HEAD(&buffer->attachments);
  	mutex_init(&buffer->lock);
  	mutex_lock(&dev->buffer_lock);

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

#3 lore raw
In reply to Nathan Chancellor
Quoted 4 lines · Nathan Chancellor

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

Quoted 22 lines
---
  drivers/staging/android/ion/ion.h  | 2 +-
  drivers/staging/android/uapi/ion.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.h +1 -1
index ea0897812780..16cbd38a7160 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * drivers/staging/android/ion/ion.h
   *
drivers/staging/android/uapi/ion.h +0 -0
index 825d3e95ccd3..5d7009884c13 100644

drivers/staging/android/uapi/ion.h line 4

Quoted 5 lines
drivers/staging/android/uapi/ion.h +1 -1
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * drivers/staging/android/uapi/ion.h
   *

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

#4 lore raw
Quoted 6 lines · Laura Abbott
Quoted 4 lines · Nathan Chancellor

checkpatch.pl complains these are invalid because the rules in Documentation/process/license-rules.rst state that C headers should have "/* */" style comments.

Quoted 7 lines

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

Quoted 29 lines
Quoted 28 lines
---
  drivers/staging/android/ion/ion.h  | 2 +-
  drivers/staging/android/uapi/ion.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.h +1 -1
index ea0897812780..16cbd38a7160 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * drivers/staging/android/ion/ion.h
   *
drivers/staging/android/uapi/ion.h +1 -1
index 825d3e95ccd3..5d7009884c13 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
  /*
   * drivers/staging/android/uapi/ion.h
   *
Acked-by
#5 lore raw
Quoted 15 lines · Nathan Chancellor
Quoted 6 lines · Laura Abbott
Quoted 4 lines · Nathan Chancellor

checkpatch.pl complains these are invalid because the rules in Documentation/process/license-rules.rst state that C headers should have "/* */" style comments.

Quoted 7 lines

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

Quoted 8 lines

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:

Quoted 29 lines
Quoted 29 lines
Quoted 28 lines
---
   drivers/staging/android/ion/ion.h  | 2 +-
   drivers/staging/android/uapi/ion.h | 2 +-
   2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion.h +1 -1
index ea0897812780..16cbd38a7160 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
   /*
    * drivers/staging/android/ion/ion.h
    *
drivers/staging/android/uapi/ion.h +1 -1
index 825d3e95ccd3..5d7009884c13 100644
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
   /*
    * drivers/staging/android/uapi/ion.h
    *