[U-Boot] [RFC] Migrate to Linux Kernel style SPDX Tags for v2018.05

Hey all,
This was already brought up by Heinrich Schuchardt, but didn't get much traction. So, I'm bringing it up again now. The little feedback from that thread was we should move to Linux Kernel style tags. I'm going to propose that we do just that, for v2018.05. I'll play with coccinelle to get it done. Comments? Thanks!

Hi Tom,
On Thu, Apr 26, 2018 at 8:26 AM, Tom Rini trini@konsulko.com wrote:
Hey all,
This was already brought up by Heinrich Schuchardt, but didn't get much traction. So, I'm bringing it up again now. The little feedback from that thread was we should move to Linux Kernel style tags. I'm going to propose that we do just that, for v2018.05. I'll play with coccinelle to get it done. Comments? Thanks!
Sounds good :-) Thanks

On 04/26/2018 01:26 PM, Tom Rini wrote:
Hey all,
This was already brought up by Heinrich Schuchardt, but didn't get much traction. So, I'm bringing it up again now. The little feedback from that thread was we should move to Linux Kernel style tags. I'm going to propose that we do just that, for v2018.05. I'll play with coccinelle to get it done. Comments? Thanks!
We rejected C++ style comments for a long long time , both in U-Boot and in Linux. Why do we accept them now ? I find them horrid and they only bring inconsistency into the coding style.

On Mon, May 07, 2018 at 02:35:16AM +0200, Marek Vasut wrote:
On 04/26/2018 01:26 PM, Tom Rini wrote:
Hey all,
This was already brought up by Heinrich Schuchardt, but didn't get much traction. So, I'm bringing it up again now. The little feedback from that thread was we should move to Linux Kernel style tags. I'm going to propose that we do just that, for v2018.05. I'll play with coccinelle to get it done. Comments? Thanks!
We rejected C++ style comments for a long long time , both in U-Boot and in Linux. Why do we accept them now ? I find them horrid and they only bring inconsistency into the coding style.
The only place they'll now be allowed, just like with the Linux Kernel, is for the first line SDPX tag in some file formats. Bringing us in line with how the kernel goes is overall a good thing I believe.

On Sun, May 6, 2018 at 10:45 PM, Tom Rini trini@konsulko.com wrote:
The only place they'll now be allowed, just like with the Linux Kernel, is for the first line SDPX tag in some file formats. Bringing us in line with how the kernel goes is overall a good thing I believe.
Correct: it is less confusing to have U-Boot and kernel using the same SPDX style.

On 05/07/2018 03:57 AM, Fabio Estevam wrote:
On Sun, May 6, 2018 at 10:45 PM, Tom Rini trini@konsulko.com wrote:
The only place they'll now be allowed, just like with the Linux Kernel, is for the first line SDPX tag in some file formats. Bringing us in line with how the kernel goes is overall a good thing I believe.
Correct: it is less confusing to have U-Boot and kernel using the same SPDX style.
And also the same inconsistent coding style then ?

On Mon, May 07, 2018 at 01:53:56PM +0200, Marek Vasut wrote:
On 05/07/2018 03:57 AM, Fabio Estevam wrote:
On Sun, May 6, 2018 at 10:45 PM, Tom Rini trini@konsulko.com wrote:
The only place they'll now be allowed, just like with the Linux Kernel, is for the first line SDPX tag in some file formats. Bringing us in line with how the kernel goes is overall a good thing I believe.
Correct: it is less confusing to have U-Boot and kernel using the same SPDX style.
And also the same inconsistent coding style then ?
A very small part of me wants to go and nuke all of the inconsistent comment styles we have today scattered around into //-style comments because _that_ enforces consistency.
"The first line is a //-style comment in C files now and the rest aren't!" I don't think is a great argument. And I don't think it's a greater argument than "The SPDX tag is always the first line (rarely the second)".

On Mon, May 7, 2018 at 8:53 AM, Marek Vasut marek.vasut@gmail.com wrote:
And also the same inconsistent coding style then ?
Not sure what inconsistent coding style you are talking about.

On 05/07/2018 06:47 PM, Fabio Estevam wrote:
On Mon, May 7, 2018 at 8:53 AM, Marek Vasut marek.vasut@gmail.com wrote:
And also the same inconsistent coding style then ?
Not sure what inconsistent coding style you are talking about.
// SPDX foo /* * bar */
Sort of stuff in the files.

On Mon, May 7, 2018 at 3:19 PM, Marek Vasut marek.vasut@gmail.com wrote:
// SPDX foo /*
- bar
*/
Sort of stuff in the files.
Yes, it seems that the preferred style is to move everything to // style in the initial comments:
// SPDX foo // // bar

2018-05-07 9:35 GMT+09:00 Marek Vasut marek.vasut@gmail.com:
On 04/26/2018 01:26 PM, Tom Rini wrote:
Hey all,
This was already brought up by Heinrich Schuchardt, but didn't get much traction. So, I'm bringing it up again now. The little feedback from that thread was we should move to Linux Kernel style tags. I'm going to propose that we do just that, for v2018.05. I'll play with coccinelle to get it done. Comments? Thanks!
We rejected C++ style comments for a long long time , both in U-Boot and in Linux. Why do we accept them now ? I find them horrid and they only bring inconsistency into the coding style.
Linus changed his mind.
https://lkml.org/lkml/2017/11/25/133

On Mon, May 07, 2018 at 01:56:54PM +0900, Masahiro Yamada wrote:
2018-05-07 9:35 GMT+09:00 Marek Vasut marek.vasut@gmail.com:
On 04/26/2018 01:26 PM, Tom Rini wrote:
Hey all,
This was already brought up by Heinrich Schuchardt, but didn't get much traction. So, I'm bringing it up again now. The little feedback from that thread was we should move to Linux Kernel style tags. I'm going to propose that we do just that, for v2018.05. I'll play with coccinelle to get it done. Comments? Thanks!
We rejected C++ style comments for a long long time , both in U-Boot and in Linux. Why do we accept them now ? I find them horrid and they only bring inconsistency into the coding style.
Linus changed his mind.
Thanks for the link! He, unsurprisingly, makes some good points. And having converted all of our tags, we do indeed have a number of places with unique comment style left.
We also had a small number of cases of incorrect tags which I think if the tag stood out more might have been caught during review.
participants (4)
-
Fabio Estevam
-
Marek Vasut
-
Masahiro Yamada
-
Tom Rini