Checkpatch: questions about what is reported
Matthieu Baerts
Hi,
This afternoon, I was quickly looking at the output of checkpatch.pl for each patch. Everything was already OK for the 10 first ones we sent to netdev.
I just sent the different patches I have, nothing important but we have to fix these warnings one day I guess :)
I also have a few questions:
mptcp: Implement MPTCP receive path
===================================
I got these warnings:
WARNING: line over 80 characters
#134: FILE: net/mptcp/options.c:104:
+ mp_opt->data_fin = (mp_opt->dss_flags &
MPTCP_DSS_DATA_FIN) != 0;
WARNING: memory barrier without comment
#470: FILE: net/mptcp/protocol.c:327:
+ smp_mb__before_atomic();
WARNING: memory barrier without comment
#472: FILE: net/mptcp/protocol.c:329:
+ smp_mb__after_atomic();
WARNING: memory barrier without comment
#530: FILE: net/mptcp/protocol.c:397:
+ smp_mb__before_atomic();
WARNING: memory barrier without comment
#532: FILE: net/mptcp/protocol.c:399:
+ smp_mb__after_atomic();
WARNING: memory barrier without comment
#838: FILE: net/mptcp/subflow.c:172:
+ smp_mb__before_atomic();
WARNING: memory barrier without comment
#840: FILE: net/mptcp/subflow.c:174:
+ smp_mb__after_atomic();
For the first one, maybe clearer to keep the line like this even if it has more than 80 chars (81 in fact...).
But for the rest, should we add comments?
General
=======
At some points, we will have to fix this one:
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
Paolo Abeni
Hi,
Quoted 6 lines · Matthieu Baerts
This afternoon, I was quickly looking at the output of checkpatch.pl for each patch. Everything was already OK for the 10 first ones we sent to netdev.
I just sent the different patches I have, nothing important but we have to fix these warnings one day I guess :)
Thank you!
Quoted 15 lines
I also have a few questions:
mptcp: Implement MPTCP receive path
===================================I got these warnings:
WARNING: line over 80 characters
#134: FILE:net/mptcp/options.c:104:
+mp_opt->data_fin= (mp_opt->dss_flags&
MPTCP_DSS_DATA_FIN) != 0;WARNING: memory barrier without comment
#470: FILE:net/mptcp/protocol.c:327:
+smp_mb__before_atomic();
[...]
Quoted 2 lines
For the first one, maybe clearer to keep the line like this even if it has more than 80 chars (81 in fact...).
Agreed.
Quoted 1 line
But for the rest, should we add comments?
I think a pair of comments there is welcome, alike:
"""
/* paired with {read,write} memory barrier in <>.
* It's necessary as the subflows set msk data ready
* without any global lock
*/
"""
Quoted 7 lines
General
=======At some points, we will have to fix this one:
WARNING: added, moved or deleted file(s), does
MAINTAINERSneed updating?
Indeed ;) Possibly with an additional patch in the next chunk ?
/P