Skip to contentSkip to conversation

Migrate to Linux Kernel style SPDX Tags for v2018.05

RFC Tom Rini 4 participants 12 messages Apr 26, 2018 – May 7, 2018

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

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!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180426/84a41d66/attachment.sig>
#1 lore raw

Hi Tom,

Quoted 7 lines · Tom Rini

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

#2 lore raw
In reply to Tom Rini
Quoted 7 lines · Tom Rini

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.

Signature · 2 lines
Best regards,
Marek Vasut
author
#3 lore raw
Quoted 9 lines · Marek Vasut
Quoted 7 lines · Tom Rini

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!

Quoted 3 lines

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180506/7a0d6356/attachment.sig>
#4 lore raw
Quoted 3 lines · Tom Rini

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.

#5 lore raw
Quoted 9 lines · Fabio Estevam
Quoted 3 lines · Tom Rini

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 ?

Signature · 2 lines
Best regards,
Marek Vasut
author
#6 lore raw
Quoted 11 lines · Marek Vasut
Quoted 8 lines · Fabio Estevam
Quoted 3 lines · Tom Rini

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)".

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180507/3958c88e/attachment.sig>
#8 lore raw
Quoted 5 lines · Fabio Estevam
Quoted 1 line · Marek Vasut

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.

Signature · 2 lines
Best regards,
Marek Vasut
#9 lore raw
Quoted 6 lines · Marek Vasut

// 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

#10 lore raw
In reply to Marek Vasut

2018-05-07 9:35 GMT+09:00 Marek Vasut <[email protected]>:

Quoted 9 lines · Tom Rini
Quoted 7 lines

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!

Quoted 4 lines

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

Signature · 2 lines
Best Regards
Masahiro Yamada
author
#11 lore raw
Quoted 10 lines · Masahiro Yamada

2018-05-07 9:35 GMT+09:00 Marek Vasut <[email protected]>:

Quoted 9 lines · Tom Rini
Quoted 7 lines

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!

Quoted 8 lines
Quoted 4 lines

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

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180507/b584dd8b/attachment.sig>