Fix for BAD_SIGN_OFF: non-standard signature
Hi Sir
I have analyzed the checkpatch report for BAD_SIGN_OFF(over v4.13..v5.8) for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.
Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txt
Complete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txt
Should I implement the fix similar to TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?
Also should I include all these misspelled words in it? Or omit words below certain frequency?
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txt
Quoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
Lukas
Quoted 2 lines
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txt
As I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txt
I have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txt
Equal to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txt
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txt
What do you think?
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txt
Quoted 8 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtWhat do you think?
For the calculation of edit distance, I have lower-cased the string and removed hyphens from the string before comparison. This helps to avoid increase in threshold for any misplaced hyphens
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 59 lines · Aditya
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txt
Quoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txt
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 67 lines · Lukas Bulwahn
Quoted 59 lines · Aditya
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txtQuoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txt
Quoted 7 lines
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Non standard signatures handled with edit distance 2:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txt
Non standard signatures with edit distance greater than 2:
https://github.com/AdityaSrivast/kernel-tasks/tree/master/random/non_standard_signature/more_than2
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 76 lines · Aditya
Quoted 67 lines · Lukas Bulwahn
Quoted 59 lines · Aditya
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txtQuoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtQuoted 7 lines
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Quoted 6 lines
Non standard signatures handled with edit distance 2:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtNon standard signatures with edit distance greater than 2:
https://github.com/AdityaSrivast/kernel-tasks/tree/master/random/non_standard_signature/more_than2
I think this mail probably got missed. I'll summarize it a bit for simplicity:
With edit distance approach and threshold as 2, we're able to handle 39 out of 109 'distinct' cases of non-standard signature. In this 39, the maximum count of non-standard signature is 19 for 'Reviwed-by:'; 9 for 'Reviewd-by:' and other common mispellings.
Complete List:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txt
However, still we are unable to account for 70 non-standard signatures which occur more frequently (eg 'Debugged-by:', which has occurred 61 times; 'Requested-by:', 48 times; and so on).
Complete list:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/more_than2/signs_freq.txt
I think for these cases we'd need to make some file (as is used for TYPO_SPELLING), or hash.
What do you think/suggest?
Thanks
Aditya
Quoted 3 lines
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 100 lines · Aditya
Quoted 76 lines · Aditya
Quoted 67 lines · Lukas Bulwahn
Quoted 59 lines · Aditya
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txtQuoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtQuoted 7 lines
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Quoted 6 lines
Non standard signatures handled with edit distance 2:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtNon standard signatures with edit distance greater than 2:
https://github.com/AdityaSrivast/kernel-tasks/tree/master/random/non_standard_signature/more_than2I think this mail probably got missed. I'll summarize it a bit for simplicity:
With edit distance approach and threshold as 2, we're able to handle 39 out of 109 'distinct' cases of non-standard signature. In this 39, the maximum count of non-standard signature is 19 for 'Reviwed-by:'; 9 for 'Reviewd-by:' and other common mispellings.
Complete List:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtHowever, still we are unable to account for 70 non-standard signatures which occur more frequently (eg 'Debugged-by:', which has occurred 61 times; 'Requested-by:', 48 times; and so on).
Complete list:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/more_than2/signs_freq.txt
Quoted 4 lines
I think for these cases we'd need to make some file (as is used for
TYPO_SPELLING), or hash.
What do you think/suggest?
Yes, I agree.
Goal 1: Try to map all the non-default signatures to their "standard" counterpart as much as possible.
Goal 2: Introduce a few very little signatures to handle those cases that really cannot be mapped to a non-default signature.
Provide good rationales that you can defend and provide documentation for when checkpatch shall explain the fix it proposes.
Here an example for the first ten cases:
1)Debugged-by: 61 -> Codeveloped-by:
Rationale: Debugging is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
2)Requested-by: 48 -> Suggested-by:
Rationale: In an open-source project, there are "no requests", just "suggestions" to convince a maintainer to accept your patch.
3)Co-authored-by: 43 -> Codeveloped-by:
Rationale: clear. Codeveloped-by and Co-authored-by are synonyms.
4)Originally-by: 39
Maybe something like this deserves to be a new tag. There is a significant difference to codeveloped-by. But that needs discussion.
5)Analyzed-by: 22
Rationale: Analyzing is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
6)Bisected-by: 20
Difficult...
(maybe a new Assisted-by would do here.)
7)Improvements-by: 19 -> Codeveloped-by:
8)Generated-by: 17 -> Reported-by: ?
What does generated-by actually mean?
9)Noticed-by: 11 -> Reported-by:
10)Inspired-by: 11 -> Suggested-by:
Maybe you can come up with a list for the next twenty and then we discuss them with Joe Perches and then a larger group?
Lukas
Quoted 7 lines
Thanks
AdityaQuoted 3 lines
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 157 lines · Lukas Bulwahn
Quoted 100 lines · Aditya
Quoted 76 lines · Aditya
Quoted 67 lines · Lukas Bulwahn
Quoted 59 lines · Aditya
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txtQuoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtQuoted 7 lines
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Quoted 6 lines
Non standard signatures handled with edit distance 2:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtNon standard signatures with edit distance greater than 2:
https://github.com/AdityaSrivast/kernel-tasks/tree/master/random/non_standard_signature/more_than2I think this mail probably got missed. I'll summarize it a bit for simplicity:
With edit distance approach and threshold as 2, we're able to handle 39 out of 109 'distinct' cases of non-standard signature. In this 39, the maximum count of non-standard signature is 19 for 'Reviwed-by:'; 9 for 'Reviewd-by:' and other common mispellings.
Complete List:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtHowever, still we are unable to account for 70 non-standard signatures which occur more frequently (eg 'Debugged-by:', which has occurred 61 times; 'Requested-by:', 48 times; and so on).
Complete list:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/more_than2/signs_freq.txtQuoted 4 lines
I think for these cases we'd need to make some file (as is used for
TYPO_SPELLING), or hash.
What do you think/suggest?Yes, I agree.
Goal 1: Try to map all the non-default signatures to their "standard" counterpart as much as possible.
Goal 2: Introduce a few very little signatures to handle those cases that really cannot be mapped to a non-default signature.
Provide good rationales that you can defend and provide documentation for when checkpatch shall explain the fix it proposes.
Here an example for the first ten cases:
1)Debugged-by: 61 -> Codeveloped-by:
Rationale: Debugging is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
2)Requested-by: 48 -> Suggested-by:
Rationale: In an open-source project, there are "no requests", just "suggestions" to convince a maintainer to accept your patch.
3)Co-authored-by: 43 -> Codeveloped-by:
Rationale: clear. Codeveloped-by and Co-authored-by are synonyms.
4)Originally-by: 39
Maybe something like this deserves to be a new tag. There is a significant difference to codeveloped-by. But that needs discussion.
5)Analyzed-by: 22
Rationale: Analyzing is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)6)Bisected-by: 20
Difficult...
(maybe a new Assisted-by would do here.)7)Improvements-by: 19 -> Codeveloped-by:
8)Generated-by: 17 -> Reported-by: ?
Quoted 9 lines
What does generated-by actually mean?
9)Noticed-by: 11 -> Reported-by:
10)Inspired-by: 11 -> Suggested-by:
Maybe you can come up with a list for the next twenty and then we discuss them with Joe Perches and then a larger group?
Sounds good. Will send by tomorrow morning :)
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 160 lines · Aditya
Quoted 159 lines · Lukas Bulwahn
Quoted 100 lines · Aditya
Quoted 76 lines · Aditya
Quoted 67 lines · Lukas Bulwahn
Quoted 59 lines · Aditya
Quoted 57 lines · Aditya
Quoted 29 lines · Lukas Bulwahn
Quoted 13 lines · Aditya
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reports for it. Some mistakes are more frequent than others, whereas some mistakes even have a frequency of 1.Non-standard signatures occurring with their frequency:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtComplete warning messages:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/warn_msgs.txtQuoted 7 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Or should I make a hash of these misspellings in checkpatch.pl file as well?Also should I include all these misspelled words in it? Or omit words below certain frequency?
I think the best way would be to compute some kind of edit distance to the known signature tags and if this edit distance is below a certain threshold, suggest that signature tag as the fix. We can then evaluate to determine the best suitable threshold. The edit distance between the different tags are so large that this should always work as intended.
Quoted 5 lines
Then, we can look into these other creative tags and propose suitable existing tags for the more frequent ones that are non-standard. Or in the case, none of the existing ones fit we can start the discussion on proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes on the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/min_dists.txtAs I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than_3.txtI have also generated lists for 3 and 4 edit distance separately for reference:
Equal to 3:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txtEqual to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txtQuoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/non_standard_signs.txtQuoted 7 lines
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Quoted 6 lines
Non standard signatures handled with edit distance 2:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtNon standard signatures with edit distance greater than 2:
https://github.com/AdityaSrivast/kernel-tasks/tree/master/random/non_standard_signature/more_than2I think this mail probably got missed. I'll summarize it a bit for simplicity:
With edit distance approach and threshold as 2, we're able to handle 39 out of 109 'distinct' cases of non-standard signature. In this 39, the maximum count of non-standard signature is 19 for 'Reviwed-by:'; 9 for 'Reviewd-by:' and other common mispellings.
Complete List:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/less_than2/signs_freq.txtHowever, still we are unable to account for 70 non-standard signatures which occur more frequently (eg 'Debugged-by:', which has occurred 61 times; 'Requested-by:', 48 times; and so on).
Complete list:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/more_than2/signs_freq.txtQuoted 4 lines
I think for these cases we'd need to make some file (as is used for
TYPO_SPELLING), or hash.
What do you think/suggest?Yes, I agree.
Goal 1: Try to map all the non-default signatures to their "standard" counterpart as much as possible.
Goal 2: Introduce a few very little signatures to handle those cases that really cannot be mapped to a non-default signature.
Provide good rationales that you can defend and provide documentation for when checkpatch shall explain the fix it proposes.
Here an example for the first ten cases:
1)Debugged-by: 61 -> Codeveloped-by:
Rationale: Debugging is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
2)Requested-by: 48 -> Suggested-by:
Rationale: In an open-source project, there are "no requests", just "suggestions" to convince a maintainer to accept your patch.
3)Co-authored-by: 43 -> Codeveloped-by:
Rationale: clear. Codeveloped-by and Co-authored-by are synonyms.
4)Originally-by: 39
Maybe something like this deserves to be a new tag. There is a significant difference to codeveloped-by. But that needs discussion.
5)Analyzed-by: 22
Rationale: Analyzing is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)6)Bisected-by: 20
Difficult...
(maybe a new Assisted-by would do here.)7)Improvements-by: 19 -> Codeveloped-by:
8)Generated-by: 17 -> Reported-by: ?
What does generated-by actually mean?
Quoted 7 lines
Quoted 7 lines
9)Noticed-by: 11 -> Reported-by:
10)Inspired-by: 11 -> Suggested-by:
Maybe you can come up with a list for the next twenty and then we discuss them with Joe Perches and then a larger group?
This is the list for next 20:
11)Original-patch-by: 11 -> co-developed-by / Originally-by (a new signoff)
Rationale: I checked mailing list for one of these signoffs. Link1:
https://lore.kernel.org/linux-perf-users/[email protected]/
Link2:
https://lore.kernel.org/linux-perf-users/[email protected]/
Here it seems like someone who started working on the patch but couldn't complete it, but still has
significant contribution in the patch.
Maybe signing off as codeveloper suffices the purpose. I'm not sure though
12)Diagnosed-by: 11 -> Maybe 'Reviewed-by' or 'Acked-by'
Rationale: Observed a few mailing lists, eg here:
https://lore.kernel.org/lkml/[email protected]/
But could not decide as the user is not adding it along the mails, but seems like a maintainer.
13)Based-on-a-patch-by: 8 -> Similar to 'Originally-by'
14)Verified-by: 8 -> Tested-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Tested-by' tag might be a suitable alternative. Link:
https://lore.kernel.org/lkml/CA+jURcugFhSt9GGRZELQUCnupOf2Ns96Ao5ZruWfVtq=z_7ytw@mail.gmail.com/
15)Okay-ished-by: 8 -> Acked-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Acked-by' tag might be a suitable alternative. Link:
https://lore.kernel.org/lkml/f06e74e9a38b83ec273196bce727295b828c5870.1507769413.git.rgb@redhat.com/
16)Based-on-patch-by: 7 -> Similar to (13) Based-on-a-patch-by
17)Root-caused-by: 6 -> Maybe 'Fixes:' followed by the commit it is fixing.
Rationale: Going through mailing list, it comes up added with the patch. So I couldn't be sure
18)Original-by: 6 -> Similar to '(4)Originally-by'
19)Acked-for-MFD-by: 6 -> Acked-by:
20)Reviewed-off-by: 5 -> Reviewed-by:
21)Based-on-patches-by: 5 -> Similar to (13)
22)Analysed-by: 5 -> Co-developed-by/Reviewed-by
Rationale: Similar to '(5)Analyzed-by'
23)Based-on-work-by: 5 -> Not sure. Maybe 'Suggested-by'
24)Proposed-by: 5 -> Maybe 'Suggested-by'
Rationale: The tag comes up added with the patch,and the user is also given the tag 'Signed-off-by', but does not seem to participate in the conversation.
Maybe he is a maintainer, who suggested the patch.
mailing list:
https://lore.kernel.org/linux-nvme/[email protected]/
25)Reported-and-bisected-by: 4 -> Two different tags: 'Reported-by:' and 'Bisected-by'
26)Fixed-by: 3 -> Co-developed-by
Rationale: I observed one of these commit conservations here:
https://lore.kernel.org/lkml/[email protected]/
It seems like there was some bug with this patch, which was fixed by the user. I guess Co-developed-by should go well as alternative.
27)Pointed-out-by: 3 -> Suggested-by
Rationale: For commit 87bd4c26a6c8 ("clocksource/drivers/tegra: Lower clocksource rating for some Tegra's"), this warning occurs, where the patch is also 'Acked-by' Peter De Schrijver. So, it seems like he is a maintainer who must have suggested these changes
28)Suggestions-by: 3 -> Suggested-by
29)Celebrated-by: 3 -> Might be suggested to remove
Rationale: This tag is used for a single commit 3 times, seems like a tag used for celebration of a particular patch
Link:
https://lore.kernel.org/lkml/CANRm+CyonYOzGdXo+D8gr8n04=f=S92QH-HxETKnoGGxhMFREA@mail.gmail.com/
30)Pointed-at-by: 2 -> Suggested-by
Rationale: One of these tags is named for Greg Kroah-Hartman <[email protected]>, who is probably a maintainer. Here, the user might just want to acknowledge him for his suggestion, so 'Suggested-by' seems appropriate.
What do you think?
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 287 lines · Aditya
Quoted 10 lines · Aditya
Quoted 9 lines · Lukas Bulwahn
Quoted 8 lines · Aditya
Quoted 6 lines · Aditya
Quoted 5 lines · Lukas Bulwahn
Quoted 4 lines · Aditya
Quoted 2 lines · Aditya
Quoted 1 line · Lukas Bulwahn
On Wed, Nov 11, 2020 at 3:13 PM Aditya <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Sir
I have analyzed the checkpatch report forBAD_SIGN_OFF(over v4.13..v5.8)for non-standard signature and generated reportsfor it.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Some mistakes are more frequent than others, whereas some
mistakes
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
even have a frequency of 1.
Non-standard signatures occurring with their frequency:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Complete warning messages:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Should I implement the fix similar to
TYPO_FIX, where we have a separate file for common misspellings and corrected words? Orshould I
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
make a hash of these misspellings in checkpatch.pl file as well?
Also should I include all these misspelled words in it? Or omit
words
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
below certain frequency?
I think the best way would be to compute some kind of edit
distance to
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the known signature tags and if this edit distance is below a
certain
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
threshold, suggest that signature tag as the fix. We can then
evaluate
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
to determine the best suitable threshold. The edit distance
between
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
the different tags are so large that this should always work as intended.
Then, we can look into these other creative tags and propose
suitable
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
existing tags for the more frequent ones that are non-standard.
Or in
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the case, none of the existing ones fit we can start the
discussion on
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
proposing some new standard ones.
I have generated a list of non-standard signatures and their fixes
on
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
the basis of edit distance.
This is the common list of non standard signatures and fixes (in detail):
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
As I observed, I think, we can consider '<=2' as the threshold edit distance.
List for non-standard signature and their proposed fix with edit distance<=2 :Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I have also generated lists for 3 and 4 edit distance separately
for
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
reference:
Equal to 3:https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_3.txt
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Equal to 4:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/random/non_standard_signature/equal_4.txt
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
For the rest I guess we'll need to hard code eg. for 'Debugged-by', 'Requested-by' etc.
These are the complete lists of non-standard signatures:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Can you share which non-standard-signatures would be handled/transformed with edit distance 2 and which would not in a similar format to non_standard_signs.txt (so, ordered by frequency).
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
We can then consider those that remain and find a good next strategy for the most frequent non-standard signatures.
Non standard signatures handled with edit distance 2:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Non standard signatures with edit distance greater than 2:
https://github.com/AdityaSrivast/kernel-tasks/tree/master/random/non_standard_signature/more_than2
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
I think this mail probably got missed. I'll summarize it a bit for simplicity:
With edit distance approach and threshold as 2, we're able to handle 39 out of 109 'distinct' cases of non-standard signature. In this 39, the maximum count of non-standard signature is 19 for 'Reviwed-by:'; 9 for 'Reviewd-by:' and other common mispellings.
Complete List:Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
However, still we are unable to account for 70 non-standard signatures which occur more frequently (eg 'Debugged-by:', which has occurred 61 times; 'Requested-by:', 48 times; and so on).
Complete list:Quoted 59 lines
Quoted 59 lines
Quoted 5 lines
I think for these cases we'd need to make some file (as is used for
TYPO_SPELLING), or hash.
What do you think/suggest?Yes, I agree.
Goal 1: Try to map all the non-default signatures to their "standard" counterpart as much as possible.
Goal 2: Introduce a few very little signatures to handle those cases that really cannot be mapped to a non-default signature.
Provide good rationales that you can defend and provide documentation for when checkpatch shall explain the fix it proposes.
Here an example for the first ten cases:
1)Debugged-by: 61 -> Codeveloped-by:
Rationale: Debugging is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
2)Requested-by: 48 -> Suggested-by:
Rationale: In an open-source project, there are "no requests", just "suggestions" to convince a maintainer to accept your patch.
3)Co-authored-by: 43 -> Codeveloped-by:
Rationale: clear. Codeveloped-by and Co-authored-by are synonyms.
4)Originally-by: 39
Maybe something like this deserves to be a new tag. There is a significant difference to codeveloped-by. But that needs discussion.
5)Analyzed-by: 22
Rationale: Analyzing is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)6)Bisected-by: 20
Difficult...
(maybe a new Assisted-by would do here.)7)Improvements-by: 19 -> Codeveloped-by:
8)Generated-by: 17 -> Reported-by: ?
What does generated-by actually mean?
Quoted 7 lines
Quoted 7 lines
9)Noticed-by: 11 -> Reported-by:
10)Inspired-by: 11 -> Suggested-by:
Maybe you can come up with a list for the next twenty and then we discuss them with Joe Perches and then a larger group?
This is the list for next 20:
11)Original-patch-by: 11 -> co-developed-by / Originally-by (a new signoff)
Rationale: I checked mailing list for one of these signoffs. Link1:https://lore.kernel.org/linux-perf-users/[email protected]/
Link2
<https://lore.kernel.org/linux-perf-users/[email protected]/Link2>
:https://lore.kernel.org/linux-perf-users/[email protected]/
Here it seems like someone who started working on the patch but couldn't complete it, but still has
significant contribution in the patch.
Maybe signing off as codeveloper suffices the purpose. I'm not sure though12)Diagnosed-by: 11 -> Maybe 'Reviewed-by' or 'Acked-by'
Rationale: Observed a few mailing lists, eg here:
https://lore.kernel.org/lkml/[email protected]/
But could not decide as the user is not adding it along the mails, but seems like a maintainer.13)Based-on-a-patch-by: 8 -> Similar to 'Originally-by'
14)Verified-by: 8 -> Tested-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Tested-by' tag might be a suitable alternative. Link:https://lore.kernel.org/lkml/CA+jURcugFhSt9GGRZELQUCnupOf2Ns96Ao5ZruWfVtq=z_7ytw@mail.gmail.com/
15)Okay-ished-by: 8 -> Acked-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Acked-by' tag might be a suitable alternative. Link:https://lore.kernel.org/lkml/f06e74e9a38b83ec273196bce727295b828c5870.1507769413.git.rgb@redhat.com/
16)Based-on-patch-by: 7 -> Similar to (13) Based-on-a-patch-by
17)Root-caused-by: 6 -> Maybe 'Fixes:' followed by the commit it is fixing.
Rationale: Going through mailing list, it comes up added with the patch. So I couldn't be sure18)Original-by: 6 -> Similar to '(4)Originally-by'
19)Acked-for-MFD-by: 6 -> Acked-by:
20)Reviewed-off-by: 5 -> Reviewed-by:
21)Based-on-patches-by: 5 -> Similar to (13)
22)Analysed-by: 5 -> Co-developed-by/Reviewed-by
Rationale: Similar to '(5)Analyzed-by'23)Based-on-work-by: 5 -> Not sure. Maybe 'Suggested-by'
24)Proposed-by: 5 -> Maybe 'Suggested-by'
Rationale: The tag comes up added with the patch,and the user is also given the tag 'Signed-off-by', but does not seem to participate in the conversation.
Maybe he is a maintainer, who suggested the patch.
mailing list:
https://lore.kernel.org/linux-nvme/[email protected]/25)Reported-and-bisected-by: 4 -> Two different tags: 'Reported-by:' and 'Bisected-by'
26)Fixed-by: 3 -> Co-developed-by
Rationale: I observed one of these commit conservations here:
https://lore.kernel.org/lkml/[email protected]/
It seems like there was some bug with this patch, which was fixed by the user. I guess Co-developed-by should go well as alternative.27)Pointed-out-by: 3 -> Suggested-by
Rationale: For commit87bd4c26a6c8("clocksource/drivers/tegra: Lower clocksource rating for some Tegra's"), this warning occurs, where the patch is also 'Acked-by' Peter De Schrijver. So, it seems like he is a maintainer who must have suggested these changes28)Suggestions-by: 3 -> Suggested-by
29)Celebrated-by: 3 -> Might be suggested to remove
Rationale: This tag is used for a single commit 3 times, seems like a tag used for celebration of a particular patch
Link:https://lore.kernel.org/lkml/CANRm+CyonYOzGdXo+D8gr8n04=f=S92QH-HxETKnoGGxhMFREA@mail.gmail.com/
Quoted 8 lines
30)Pointed-at-by: 2 -> Suggested-by
Rationale: One of these tags is named for Greg Kroah-Hartman <[email protected]>, who is probably a maintainer. Here, the user might just want to acknowledge him for his suggestion, so 'Suggested-by' seems appropriate.What do you think?
I will provide some detailed comments in a few days, okay?
I suggest you start creating the patch that fixes tags with the low edit distance.
Once that patch is good and accepted, we continue with the work on this list.
Lukas
Quoted 3 lines
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 69 lines
Quoted 51 lines
Quoted 51 lines
Goal 1: Try to map all the non-default signatures to their "standard" counterpart as much as possible.
Goal 2: Introduce a few very little signatures to handle those cases that really cannot be mapped to a non-default signature.
Provide good rationales that you can defend and provide documentation for when checkpatch shall explain the fix it proposes.
Here an example for the first ten cases:
1)Debugged-by: 61 -> Codeveloped-by:
Rationale: Debugging is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
2)Requested-by: 48 -> Suggested-by:
Rationale: In an open-source project, there are "no requests", just "suggestions" to convince a maintainer to accept your patch.
3)Co-authored-by: 43 -> Codeveloped-by:
Rationale: clear. Codeveloped-by and Co-authored-by are synonyms.
4)Originally-by: 39
Maybe something like this deserves to be a new tag. There is a significant difference to codeveloped-by. But that needs discussion.
5)Analyzed-by: 22
Rationale: Analyzing is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)6)Bisected-by: 20
Difficult...
(maybe a new Assisted-by would do here.)7)Improvements-by: 19 -> Codeveloped-by:
8)Generated-by: 17 -> Reported-by: ?
What does generated-by actually mean?
Quoted 7 lines
Quoted 7 lines
9)Noticed-by: 11 -> Reported-by:
10)Inspired-by: 11 -> Suggested-by:
Maybe you can come up with a list for the next twenty and then we discuss them with Joe Perches and then a larger group?
This is the list for next 20:
11)Original-patch-by: 11 -> co-developed-by / Originally-by (a new signoff)
Rationale: I checked mailing list for one of these signoffs. Link1:
https://lore.kernel.org/linux-perf-users/[email protected]/
Link2:
https://lore.kernel.org/linux-perf-users/[email protected]/
Quoted 5 lines
Here it seems like someone who started working on the patch but couldn't complete it, but still has
significant contribution in the patch.
Maybe signing off as codeveloper suffices the purpose. I'm not sure though
Agree, that is up for discussion. Either co-developed-by or one new tag.
Quoted 6 lines
12)Diagnosed-by: 11 -> Maybe 'Reviewed-by' or 'Acked-by'
Rationale: Observed a few mailing lists, eg here:
https://lore.kernel.org/lkml/[email protected]/
But could not decide as the user is not adding it along the mails, but seems like a maintainer.
I do not think Acked-by, maybe co-developed-by or reviewed-by.
Quoted 8 lines
13)Based-on-a-patch-by: 8 -> Similar to 'Originally-by'
14)Verified-by: 8 -> Tested-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Tested-by' tag might be a suitable alternative. Link:
https://lore.kernel.org/lkml/CA+jURcugFhSt9GGRZELQUCnupOf2Ns96Ao5ZruWfVtq=z_7ytw@mail.gmail.com/
Agree.
Quoted 6 lines
15)Okay-ished-by: 8 -> Acked-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Acked-by' tag might be a suitable alternative. Link:
https://lore.kernel.org/lkml/f06e74e9a38b83ec273196bce727295b828c5870.1507769413.git.rgb@redhat.com/
Agree.
Quoted 2 lines
16)Based-on-patch-by: 7 -> Similar to (13) Based-on-a-patch-by
Agree.
Quoted 5 lines
17)Root-caused-by: 6 -> Maybe 'Fixes:' followed by the commit it is fixing.
Rationale: Going through mailing list, it comes up added with the patch. So I couldn't be sure
Hmm... you need to show me the cases where this tag is used.
If the tag is not followed by an identity (name + email), it should not be a signature tag anyway.
Quoted 2 lines
18)Original-by: 6 -> Similar to '(4)Originally-by'
Agree.
Quoted 2 lines
19)Acked-for-MFD-by: 6 -> Acked-by:
Agree.
Quoted 2 lines
20)Reviewed-off-by: 5 -> Reviewed-by:
Agree.
Quoted 2 lines
21)Based-on-patches-by: 5 -> Similar to (13)
Agree.
Quoted 3 lines
22)Analysed-by: 5 -> Co-developed-by/Reviewed-by
Rationale: Similar to '(5)Analyzed-by'
Agree.
Quoted 2 lines
23)Based-on-work-by: 5 -> Not sure. Maybe 'Suggested-by'
Or similar to 13?
Quoted 8 lines
24)Proposed-by: 5 -> Maybe 'Suggested-by'
Rationale: The tag comes up added with the patch,and the user is also given the tag 'Signed-off-by', but does not seem to participate in the conversation.
Maybe he is a maintainer, who suggested the patch.
mailing list:
https://lore.kernel.org/linux-nvme/[email protected]/
Agree.
Quoted 3 lines
25)Reported-and-bisected-by: 4 -> Two different tags: 'Reported-by:' and 'Bisected-by'
Agree.
Quoted 6 lines
26)Fixed-by: 3 -> Co-developed-by
Rationale: I observed one of these commit conservations here:
https://lore.kernel.org/lkml/[email protected]/
It seems like there was some bug with this patch, which was fixed by the user. I guess Co-developed-by should go well as alternative.
Agree.
Quoted 6 lines
27)Pointed-out-by: 3 -> Suggested-by
Rationale: For commit87bd4c26a6c8("clocksource/drivers/tegra: Lower clocksource rating for some Tegra's"), this warning occurs, where the patch is also 'Acked-by' Peter De Schrijver. So, it seems like he is a maintainer who must have suggested these changes
Agree.
Quoted 2 lines
28)Suggestions-by: 3 -> Suggested-by
Agree.
Quoted 6 lines
29)Celebrated-by: 3 -> Might be suggested to remove
Rationale: This tag is used for a single commit 3 times, seems like a tag used for celebration of a particular patch
Link:
https://lore.kernel.org/lkml/CANRm+CyonYOzGdXo+D8gr8n04=f=S92QH-HxETKnoGGxhMFREA@mail.gmail.com/
Agree. Let us suggest deleting such tags.
Quoted 6 lines
30)Pointed-at-by: 2 -> Suggested-by
Rationale: One of these tags is named for Greg Kroah-Hartman <[email protected]>, who is probably a maintainer. Here, the user might just want to acknowledge him for his suggestion, so 'Suggested-by' seems appropriate.
Agree.
Quoted 2 lines
What do you think?
Can you start to implement a patch that creates the basic logic to let checkpatch.pl suggest the alternatives for those 30 cases above.
Also, it might be good if checkpatch.pl also provides the explanation why that alternative is proposed (when it is not totally obvious).
Can you also summarize which of the 30 cases need a further discussion with Joe?
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 40 lines · Lukas Bulwahn
Quoted 40 lines
Quoted 40 lines
Quoted 40 lines
Goal 1: Try to map all the non-default signatures to their "standard" counterpart as much as possible.
Goal 2: Introduce a few very little signatures to handle those cases that really cannot be mapped to a non-default signature.
Provide good rationales that you can defend and provide documentation for when checkpatch shall explain the fix it proposes.
Here an example for the first ten cases:
1)Debugged-by: 61 -> Codeveloped-by:
Rationale: Debugging is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
2)Requested-by: 48 -> Suggested-by:
Rationale: In an open-source project, there are "no requests", just "suggestions" to convince a maintainer to accept your patch.
3)Co-authored-by: 43 -> Codeveloped-by:
Rationale: clear. Codeveloped-by and Co-authored-by are synonyms.
4)Originally-by: 39
Maybe something like this deserves to be a new tag. There is a significant difference to codeveloped-by. But that needs discussion.
5)Analyzed-by: 22
Rationale: Analyzing is part of Software Development; so Codeveloped-by is perfectly fine, even if the contributor did not create code.
(alternatively: maybe a new Assisted-by would do here.)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
6)Bisected-by: 20
Difficult...
(maybe a new Assisted-by would do here.)7)Improvements-by: 19 -> Codeveloped-by:
8)Generated-by: 17 -> Reported-by: ?
So, I checked mailing list. Generated-by is used by the user to quote script(s) and not the person.
E.g., Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Maybe, it should be suggested to delete this tag.
What do you think?
Quoted 63 lines
Quoted 21 lines
Quoted 10 lines
Quoted 10 lines
What does generated-by actually mean?
9)Noticed-by: 11 -> Reported-by:
10)Inspired-by: 11 -> Suggested-by:
Maybe you can come up with a list for the next twenty and then we discuss them with Joe Perches and then a larger group?
This is the list for next 20:
11)Original-patch-by: 11 -> co-developed-by / Originally-by (a new signoff)
Rationale: I checked mailing list for one of these signoffs. Link1:
https://lore.kernel.org/linux-perf-users/[email protected]/
Link2:
https://lore.kernel.org/linux-perf-users/[email protected]/Quoted 5 lines
Here it seems like someone who started working on the patch but couldn't complete it, but still has
significant contribution in the patch.
Maybe signing off as codeveloper suffices the purpose. I'm not sure thoughAgree, that is up for discussion. Either co-developed-by or one new tag.
Quoted 6 lines
12)Diagnosed-by: 11 -> Maybe 'Reviewed-by' or 'Acked-by'
Rationale: Observed a few mailing lists, eg here:
https://lore.kernel.org/lkml/[email protected]/
But could not decide as the user is not adding it along the mails, but seems like a maintainer.I do not think Acked-by, maybe co-developed-by or reviewed-by.
Quoted 8 lines
13)Based-on-a-patch-by: 8 -> Similar to 'Originally-by'
14)Verified-by: 8 -> Tested-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Tested-by' tag might be a suitable alternative. Link:
https://lore.kernel.org/lkml/CA+jURcugFhSt9GGRZELQUCnupOf2Ns96Ao5ZruWfVtq=z_7ytw@mail.gmail.com/Agree.
Quoted 6 lines
15)Okay-ished-by: 8 -> Acked-by
Rationale: Used by a single user. On reading, mailing list, it seems that 'Acked-by' tag might be a suitable alternative. Link:
https://lore.kernel.org/lkml/f06e74e9a38b83ec273196bce727295b828c5870.1507769413.git.rgb@redhat.com/Agree.
Quoted 2 lines
16)Based-on-patch-by: 7 -> Similar to (13) Based-on-a-patch-by
Agree.
Quoted 8 lines
Quoted 5 lines
17)Root-caused-by: 6 -> Maybe 'Fixes:' followed by the commit it is fixing.
Rationale: Going through mailing list, it comes up added with the patch. So I couldn't be sureHmm... you need to show me the cases where this tag is used.
These are some of the examples:
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/lkml/[email protected]/
https://lore.kernel.org/lkml/[email protected]/
Not sure if it is used as git blame or maybe to define the 'root' of the tree at the time, etc
Quoted 27 lines
If the tag is not followed by an identity (name + email), it should not be a signature tag anyway.
Quoted 2 lines
18)Original-by: 6 -> Similar to '(4)Originally-by'
Agree.
Quoted 2 lines
19)Acked-for-MFD-by: 6 -> Acked-by:
Agree.
Quoted 2 lines
20)Reviewed-off-by: 5 -> Reviewed-by:
Agree.
Quoted 2 lines
21)Based-on-patches-by: 5 -> Similar to (13)
Agree.
Quoted 3 lines
22)Analysed-by: 5 -> Co-developed-by/Reviewed-by
Rationale: Similar to '(5)Analyzed-by'
Quoted 7 lines
Agree.
Quoted 2 lines
23)Based-on-work-by: 5 -> Not sure. Maybe 'Suggested-by'
Or similar to 13?
Yes, agree.
Quoted 56 lines
Quoted 8 lines
24)Proposed-by: 5 -> Maybe 'Suggested-by'
Rationale: The tag comes up added with the patch,and the user is also given the tag 'Signed-off-by', but does not seem to participate in the conversation.
Maybe he is a maintainer, who suggested the patch.
mailing list:
https://lore.kernel.org/linux-nvme/[email protected]/Agree.
Quoted 3 lines
25)Reported-and-bisected-by: 4 -> Two different tags: 'Reported-by:' and 'Bisected-by'
Agree.
Quoted 6 lines
26)Fixed-by: 3 -> Co-developed-by
Rationale: I observed one of these commit conservations here:
https://lore.kernel.org/lkml/[email protected]/
It seems like there was some bug with this patch, which was fixed by the user. I guess Co-developed-by should go well as alternative.Agree.
Quoted 6 lines
27)Pointed-out-by: 3 -> Suggested-by
Rationale: For commit87bd4c26a6c8("clocksource/drivers/tegra: Lower clocksource rating for some Tegra's"), this warning occurs, where the patch is also 'Acked-by' Peter De Schrijver. So, it seems like he is a maintainer who must have suggested these changesAgree.
Quoted 2 lines
28)Suggestions-by: 3 -> Suggested-by
Agree.
Quoted 6 lines
29)Celebrated-by: 3 -> Might be suggested to remove
Rationale: This tag is used for a single commit 3 times, seems like a tag used for celebration of a particular patch
Link:
https://lore.kernel.org/lkml/CANRm+CyonYOzGdXo+D8gr8n04=f=S92QH-HxETKnoGGxhMFREA@mail.gmail.com/Agree. Let us suggest deleting such tags.
Quoted 6 lines
30)Pointed-at-by: 2 -> Suggested-by
Rationale: One of these tags is named for Greg Kroah-Hartman <[email protected]>, who is probably a maintainer. Here, the user might just want to acknowledge him for his suggestion, so 'Suggested-by' seems appropriate.
Quoted 8 lines
Agree.
Quoted 2 lines
What do you think?
Can you start to implement a patch that creates the basic logic to let checkpatch.pl suggest the alternatives for those 30 cases above.
Okay. One doubt though, do I need to create a separate patch for edit distance fix? I am planning to create a hash for these typos(which do not fulfill edit distance criteria) in checkpatch.pl itself.
What do you think?
Quoted 5 lines
Also, it might be good if checkpatch.pl also provides the explanation why that alternative is proposed (when it is not totally obvious).
Can you also summarize which of the 30 cases need a further discussion with Joe?
Debugged-by: co-developed-by/reviewed-by/new tag
Originally-by: Co-developed-by / maybe a new tag
Bisected-by
Diagnosed-by
Root-caused-by: not sure if it is used as git blame or maybe to define the 'root' of the tree at the time, etc
Quoted 2 lines
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH 1/1 checkpatch: add fix and improve warning msg for Non-standard signature
Checkpatch.pl warns on non-standard signature styles.
E.g., running checkpatch on commit 513f7f747e1c ("parisc: Fix vmap memory leak in ioremap()/iounmap()") reports this warning:
WARNING: Non-standard signature: Noticed-by:
Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not required
Also, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature
--- scripts/checkpatch.pl | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)
scripts/checkpatch.pl +43 -2
@@ -506,6 +506,27 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => "Suggested-by:", + "Co-authored-by:" => "Co-developed-by:", + "Analyzed-by:" => "Co-developed-by:", + "Analysed-by:" => "Co-developed-by:", + "Improvements-by:" => "Co-developed-by:", + "Noticed-by:" => "Reported-by:", + "Inspired-by:" => "Suggested-by:", + "Verified-by:" => "Tested-by:", + "Okay-ished-by:" => "Acked-by:", + "Acked-for-MFD-by:" => "Acked-by:", + "Reviewed-off-by:" => "Reviewed-by:", + "Proposed-by:" => "Suggested-by:", + "Fixed-by:" => "Co-developed-by:", + "Pointed-out-by:" => "Suggested-by:", + "Pointed-at-by:" => "Suggested-by:", + "Suggestions-by:" => "Suggested-by:", + "Generated-by:" => "remove", + "Celebrated-by:" => "remove", +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -2773,8 +2794,28 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag.\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead.\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/; + } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF",
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 74 lines · Aditya Srivastava
Checkpatch.pl warns on non-standard signature styles.
E.g., running checkpatch on commit
513f7f747e1c("parisc: Fix vmap memory leak in ioremap()/iounmap()") reports this warning:WARNING: Non-standard signature: Noticed-by:
Noticed-by Sven Schnelle <[email protected]>Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not requiredAlso, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature
Signed-off-by Aditya Srivastava <[email protected]>--- scripts/checkpatch.pl | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)scripts/checkpatch.pl +36
-2@@ -506,6 +506,27 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => "Suggested-by:", + "Co-authored-by:" => "Co-developed-by:", + "Analyzed-by:" => "Co-developed-by:", + "Analysed-by:" => "Co-developed-by:", + "Improvements-by:" => "Co-developed-by:", + "Noticed-by:" => "Reported-by:", + "Inspired-by:" => "Suggested-by:", + "Verified-by:" => "Tested-by:", + "Okay-ished-by:" => "Acked-by:", + "Acked-for-MFD-by:" => "Acked-by:", + "Reviewed-off-by:" => "Reviewed-by:", + "Proposed-by:" => "Suggested-by:", + "Fixed-by:" => "Co-developed-by:", + "Pointed-out-by:" => "Suggested-by:", + "Pointed-at-by:" => "Suggested-by:", + "Suggestions-by:" => "Suggested-by:", + "Generated-by:" => "remove", + "Celebrated-by:" => "remove", +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2794,28 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag.\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + }
scripts/checkpatch.pl sub process { · line 2821
Quoted 10 lines
scripts/checkpatch.pl +7
-0+ else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead.\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/; + } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF",
Initial tests performed on patches found this fix to be working as expected.
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 9 lines · Aditya
Quoted 8 lines · Aditya Srivastava
Checkpatch.pl warns on non-standard signature styles.
E.g., running checkpatch on commit
513f7f747e1c("parisc: Fix vmap memory leak in ioremap()/iounmap()") reports this warning:WARNING: Non-standard signature: Noticed-by:
Noticed-by Sven Schnelle <[email protected]>
This example really does not tell anyone much.
Replace it with a summary from your evaluation.
Quoted 7 lines
Quoted 7 lines
Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not requiredAlso, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature
Looks good.
Quoted 26 lines
Quoted 26 lines
Signed-off-by Aditya Srivastava <[email protected]>--- scripts/checkpatch.pl | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)scripts/checkpatch.pl +13
-0@@ -506,6 +506,27 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => "Suggested-by:", + "Co-authored-by:" => "Co-developed-by:", + "Analyzed-by:" => "Co-developed-by:", + "Analysed-by:" => "Co-developed-by:", + "Improvements-by:" => "Co-developed-by:", + "Noticed-by:" => "Reported-by:", + "Inspired-by:" => "Suggested-by:", + "Verified-by:" => "Tested-by:", + "Okay-ished-by:" => "Acked-by:", + "Acked-for-MFD-by:" => "Acked-by:", + "Reviewed-off-by:" => "Reviewed-by:", + "Proposed-by:" => "Suggested-by:",
Quoted 8 lines
scripts/checkpatch.pl our $signature_tags = qr{(?xi: · line 529
Quoted 8 lines
scripts/checkpatch.pl +8
-0+ "Fixed-by:" => "Co-developed-by:", + "Pointed-out-by:" => "Suggested-by:", + "Pointed-at-by:" => "Suggested-by:", + "Suggestions-by:" => "Suggested-by:", + "Generated-by:" => "remove", + "Celebrated-by:" => "remove", +); +
How did create this list? I thought we looked at 30 cases...
Quoted 44 lines
scripts/checkpatch.pl sub process { · line 2777
Quoted 9 lines
scripts/checkpatch.pl +0
-2our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2794,28 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n". $herecurr);
scripts/checkpatch.pl sub process { · line 2798
Quoted 2 lines
scripts/checkpatch.pl +2
-0+ my $suggested_signature = ""; + if(
exists($standard_signature_fix{$sign_off})) {scripts/checkpatch.pl sub process { · line 2799
Quoted 1 line
scripts/checkpatch.pl +1
-0+ $suggested_signature =$standard_signature_fix{$sign_off};
scripts/checkpatch.pl sub process {
Quoted 4 lines
scripts/checkpatch.pl +4
-0+ } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature:$sign_off\n" . $herecurr);
scripts/checkpatch.pl sub process {
Quoted 4 lines
scripts/checkpatch.pl +4
-0+ } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature:$sign_off. Please consider removing this signature tag.\n" . $herecurr) &&
scripts/checkpatch.pl sub process { · line 2809
Quoted 2 lines
scripts/checkpatch.pl +2
-0+ $fix) { +
fix_delete_line($fixlinenr, $rawline);scripts/checkpatch.pl sub process {
Quoted 5 lines
scripts/checkpatch.pl +5
-0+ } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature:$sign_off. Please use '$suggested_signature' instead.\n" . $herecurr) &&
scripts/checkpatch.pl sub process { · line 2816
Quoted 2 lines
scripts/checkpatch.pl +2
-0+ $fix) { + $fixed[$fixlinenr] =~s/$sign_off/$suggested_signature/;
scripts/checkpatch.pl sub process { · line 2821
Quoted 6 lines
scripts/checkpatch.pl +2
-0+ } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF",
Quoted 6 lines
Initial tests performed on patches found this fix to be working as expected.
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 8 lines · Lukas Bulwahn
Quoted 6 lines · Aditya
Quoted 5 lines · Aditya Srivastava
Checkpatch.pl warns on non-standard signature styles.
E.g., running checkpatch on commit
513f7f747e1c("parisc: Fix vmap memory leak in ioremap()/iounmap()") reports this warning:
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
WARNING: Non-standard signature: Noticed-by:
Noticed-by Sven Schnelle <[email protected]>This example really does not tell anyone much.
Replace it with a summary from your evaluation.
Okay
Quoted 43 lines
Quoted 8 lines
Quoted 8 lines
Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not requiredAlso, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature
Looks good.
Quoted 29 lines
Quoted 29 lines
Signed-off-by Aditya Srivastava <[email protected]>--- scripts/checkpatch.pl | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)scripts/checkpatch.pl +16
-0@@ -506,6 +506,27 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => "Suggested-by:", + "Co-authored-by:" => "Co-developed-by:", + "Analyzed-by:" => "Co-developed-by:", + "Analysed-by:" => "Co-developed-by:", + "Improvements-by:" => "Co-developed-by:", + "Noticed-by:" => "Reported-by:", + "Inspired-by:" => "Suggested-by:", + "Verified-by:" => "Tested-by:", + "Okay-ished-by:" => "Acked-by:", + "Acked-for-MFD-by:" => "Acked-by:", + "Reviewed-off-by:" => "Reviewed-by:", + "Proposed-by:" => "Suggested-by:", + "Fixed-by:" => "Co-developed-by:", + "Pointed-out-by:" => "Suggested-by:", + "Pointed-at-by:" => "Suggested-by:",
Quoted 10 lines
Quoted 5 lines
scripts/checkpatch.pl our $signature_tags = qr{(?xi: · line 529
Quoted 5 lines
scripts/checkpatch.pl +5
-0+ "Suggestions-by:" => "Suggested-by:", + "Generated-by:" => "remove", + "Celebrated-by:" => "remove", +); +How did create this list? I thought we looked at 30 cases...
Yes, correct. Others are the cases which required discussion like:
"Originally-by" and its variants (including 'Based-on-patch-by', etc), "Bisected-by", "Diagnosed-by", "Root-caused-by".
Thanks
Aditya
Quoted 44 lines
Quoted 44 lines
scripts/checkpatch.pl sub process { · line 2777
Quoted 9 lines
scripts/checkpatch.pl +0
-2our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2794,28 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n". $herecurr);
scripts/checkpatch.pl sub process { · line 2798
Quoted 2 lines
scripts/checkpatch.pl +2
-0+ my $suggested_signature = ""; + if(
exists($standard_signature_fix{$sign_off})) {scripts/checkpatch.pl sub process { · line 2799
Quoted 1 line
scripts/checkpatch.pl +1
-0+ $suggested_signature =$standard_signature_fix{$sign_off};
scripts/checkpatch.pl sub process {
Quoted 4 lines
scripts/checkpatch.pl +4
-0+ } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature:$sign_off\n" . $herecurr);
scripts/checkpatch.pl sub process {
Quoted 4 lines
scripts/checkpatch.pl +4
-0+ } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature:$sign_off. Please consider removing this signature tag.\n" . $herecurr) &&
scripts/checkpatch.pl sub process { · line 2809
Quoted 2 lines
scripts/checkpatch.pl +2
-0+ $fix) { +
fix_delete_line($fixlinenr, $rawline);scripts/checkpatch.pl sub process {
Quoted 5 lines
scripts/checkpatch.pl +5
-0+ } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature:$sign_off. Please use '$suggested_signature' instead.\n" . $herecurr) &&
scripts/checkpatch.pl sub process { · line 2816
Quoted 2 lines
scripts/checkpatch.pl +2
-0+ $fix) { + $fixed[$fixlinenr] =~s/$sign_off/$suggested_signature/;
Quoted 6 lines
scripts/checkpatch.pl +2
-0+ } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF",
Quoted 7 lines
Quoted 6 lines
Initial tests performed on patches found this fix to be working as expected.
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH v2 1/1 checkpatch: add fix and improve warning msg for Non-standard signature
Checkpatch.pl warns on non-standard signature styles.
This warning usually occurs because of incorrect use of signature tags, e.g. tags such as 'Co-authored-by', which although seem correct, is not a standard signature. Its standard equivalent is 'Co-developed-by'.
An evaluation over v4.13..v5.8 found 'Co-authored-by' tag used 43 times
Similarly, 'Requested-by'(used 48 times) has its equivalent as 'Suggested-by', and so on.
Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not required
Also, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature
---
changes in v2: replace commit specific example with brief evaluation
scripts/checkpatch.pl | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)
scripts/checkpatch.pl +43 -2
@@ -506,6 +506,27 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => "Suggested-by:", + "Co-authored-by:" => "Co-developed-by:", + "Analyzed-by:" => "Co-developed-by:", + "Analysed-by:" => "Co-developed-by:", + "Improvements-by:" => "Co-developed-by:", + "Noticed-by:" => "Reported-by:", + "Inspired-by:" => "Suggested-by:", + "Verified-by:" => "Tested-by:", + "Okay-ished-by:" => "Acked-by:", + "Acked-for-MFD-by:" => "Acked-by:", + "Reviewed-off-by:" => "Reviewed-by:", + "Proposed-by:" => "Suggested-by:", + "Fixed-by:" => "Co-developed-by:", + "Pointed-out-by:" => "Suggested-by:", + "Pointed-at-by:" => "Suggested-by:", + "Suggestions-by:" => "Suggested-by:", + "Generated-by:" => "remove", + "Celebrated-by:" => "remove", +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -2773,8 +2794,28 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag.\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead.\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/; + } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF",
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH v2] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 12 lines · Aditya Srivastava
Checkpatch.pl warns on non-standard signature styles.
This warning usually occurs because of incorrect use of signature tags, e.g. tags such as 'Co-authored-by', which although seem correct, is not a standard signature. Its standard equivalent is 'Co-developed-by'.
An evaluation over v4.13..v5.8 found 'Co-authored-by' tag used 43 times
Similarly, 'Requested-by'(used 48 times) has its equivalent as 'Suggested-by', and so on.
Better but still an incomplete summary.
"and so on" is not good.
Consider a description that explains how you came to the conclusion.
Then consider presenting the count of non-standard signature tags from v4.13..v5.8 is a simple structured form.
By the way, there is no limit on the length of a commit message as long as you convey information in a dense form.
Also, consider to present the rationale for each replacement. checkpatch shall explain to its user why it considers the replacement appropriate.
Lukas
Quoted 78 lines
Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not requiredAlso, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature
Signed-off-by Aditya Srivastava <[email protected]>---
changes in v2: replace commit specific example with brief evaluationscripts/checkpatch.pl | 45 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-)scripts/checkpatch.pl +43
-3@@ -506,6 +506,27 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => "Suggested-by:", + "Co-authored-by:" => "Co-developed-by:", + "Analyzed-by:" => "Co-developed-by:", + "Analysed-by:" => "Co-developed-by:", + "Improvements-by:" => "Co-developed-by:", + "Noticed-by:" => "Reported-by:", + "Inspired-by:" => "Suggested-by:", + "Verified-by:" => "Tested-by:", + "Okay-ished-by:" => "Acked-by:", + "Acked-for-MFD-by:" => "Acked-by:", + "Reviewed-off-by:" => "Reviewed-by:", + "Proposed-by:" => "Suggested-by:", + "Fixed-by:" => "Co-developed-by:", + "Pointed-out-by:" => "Suggested-by:", + "Pointed-at-by:" => "Suggested-by:", + "Suggestions-by:" => "Suggested-by:", + "Generated-by:" => "remove", + "Celebrated-by:" => "remove", +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2794,28 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag.\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead.\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/; + } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF", --
Quoted 2 lines
2.17.1
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
PATCH v3 1/1 checkpatch: add fix and improve warning msg for Non-standard signature
Currently, checkpatch.pl warns for BAD_SIGN_OFF on non-standard signature styles.
This warning occurs because of incorrect use of signature tags, e.g. an evaluation on v4.13..v5.8 showed the use of following incorrect signature tags, which may seem correct, but are not standard:
1) Requested-by (count: 48) => Suggested-by
Rationale: In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch
2) Co-authored-by (count: 43) => Co-developed-by
Rationale: Co-developed-by and Co-authored-by are synonyms
3) Analyzed-by (count: 22) / Analysed-by (count: 5) => Co-developed-by
Rationale: Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code
4) Improvements-by (count: 19) => Co-developed-by
5) Noticed-by (count: 11) => Reported-by
6) Inspired-by (count: 11) => Suggested-by
7) Verified-by (count: 8) => Tested-by
Rationale: Used by a single user. On reading mailing list, it seems Tested-by might be a suitable alternative
8) Okay-ished-by (count: 8) => Acked-by
Rationale: Used by a single user. On reading mailing list, it seems Acked-by must be suitable alternative
9) Acked-for-MFD-by (count: 6) => Acked-by
10) Reviewed-off-by (count: 5) => Reviewed-by
11) Proposed-by (count: 5) => Suggested-by
Rationale: On observing the mailing list, this tag is always used for a maintainer. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same
12) Fixed-by (count: 3) => Co-developed-by
Rationale: Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code
13) Pointed-out-by (count: 3) / Pointed-at-by (count: 2) => Suggested-by
Rationale: The tags are used for maintainers. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same
E.g., Pointed-at-by: Greg Kroah-Hartman <[email protected]>
14) Suggestions-by (count: 3) => Suggested-by
15) Generated-by (count: 17) => remove the tag
On observing the mailing list, this tag is always used for quoting the tool or script, which might have been used to generate the patch. E.g. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
16) Celebrated-by (count: 3) => remove the tag
This tag was used for only one commit. On observing mailing list, it seem like the celebration for a particular patch and changes.
Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not required
Also, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature. Also provide suitable rationale to the user for the suggestion made.
---
changes in v2: replace commit specific example with brief evaluation
changes in v3: provide rationale to users for every signature tag suggestion; modify commit message describing arrival to conclusion in a structured way
scripts/checkpatch.pl | 101 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-)
scripts/checkpatch.pl +99 -2
@@ -506,6 +506,81 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => { + suggestion => "Suggested-by:", + rationale => "In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch", + }, + "Co-authored-by:" => { + suggestion => "Co-developed-by:", + rationale => "Co-developed-by and Co-authored-by are synonyms", + }, + "Analyzed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Analysed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analysing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Improvements-by:" => { + suggestion => "Co-developed-by:", + rationale => "Performing improvements are a part of Software Developement, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Noticed-by:" => { + suggestion => "Reported-by:", + rationale => "Reported-by and Noticed-by are synonyms", + }, + "Inspired-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Verified-by:" => { + suggestion => "Tested-by:", + rationale => "Tested-by and Verified-by are synonyms", + }, + "Okay-ished-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Acked-for-MFD-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Reviewed-off-by:" => { + suggestion => "Reviewed-by:", + rationale => "Reviewed-by is the standard signature tag for recording your approval", + }, + "Proposed-by:" => { + suggestion => "Suggested-by:", + rationale => "Proposing changes is same as suggesting changes, so Suggested-by seems perfectly fine", + }, + "Fixed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Pointed-out-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing out certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Pointed-at-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing at certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Suggestions-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Generated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. It is advised to describe about tools in commit description instead", + }, + "Celebrated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. This tag may not be required at all", + }, +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -2773,8 +2848,30 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + my $rationale = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}{'suggestion'}; + $rationale = $standard_signature_fix{$sign_off}{'rationale'}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag. $rationale\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead. $rationale\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/; + } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF",
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH v3] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 69 lines · Aditya Srivastava
Currently, checkpatch.pl warns for
BAD_SIGN_OFFon non-standard signature styles.This warning occurs because of incorrect use of signature tags, e.g. an evaluation on v4.13..v5.8 showed the use of following incorrect signature tags, which may seem correct, but are not standard:
1) Requested-by (count: 48) => Suggested-by
Rationale: In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch2) Co-authored-by (count: 43) => Co-developed-by
Rationale: Co-developed-by and Co-authored-by are synonyms3) Analyzed-by (count: 22) / Analysed-by (count: 5) => Co-developed-by
Rationale: Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code4) Improvements-by (count: 19) => Co-developed-by
5) Noticed-by (count: 11) => Reported-by
6) Inspired-by (count: 11) => Suggested-by
7) Verified-by (count: 8) => Tested-by
Rationale: Used by a single user. On reading mailing list, it seems Tested-by might be a suitable alternative8) Okay-ished-by (count: 8) => Acked-by
Rationale: Used by a single user. On reading mailing list, it seems Acked-by must be suitable alternative9) Acked-for-MFD-by (count: 6) => Acked-by
10) Reviewed-off-by (count: 5) => Reviewed-by
11) Proposed-by (count: 5) => Suggested-by
Rationale: On observing the mailing list, this tag is always used for a maintainer. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same12) Fixed-by (count: 3) => Co-developed-by
Rationale: Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code13) Pointed-out-by (count: 3) / Pointed-at-by (count: 2) => Suggested-by
Rationale: The tags are used for maintainers. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same
E.g., Pointed-at-by: Greg Kroah-Hartman <[email protected]>14) Suggestions-by (count: 3) => Suggested-by
15) Generated-by (count: 17) => remove the tag
On observing the mailing list, this tag is always used for quoting the tool or script, which might have been used to generate the patch. E.g. Generated-by:scripts/coccinelle/api/alloc/kzalloc-simple.cocci16) Celebrated-by (count: 3) => remove the tag
This tag was used for only one commit. On observing mailing list, it seem like the celebration for a particular patch and changes.Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not required
Quoted 5 lines
Also, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature. Also provide suitable rationale to the user for the suggestion made.
Signed-off-by Aditya Srivastava <[email protected]>
Looks good to me. Let us propose this to Joe for review.
Also, you can already start working on the related feature for providing fixes based on the edit distance.
With both features, we can probably fix all non-standard signatures...
Lukas
Quoted 129 lines
---
changes in v2: replace commit specific example with brief evaluationchanges in v3: provide rationale to users for every signature tag suggestion; modify commit message describing arrival to conclusion in a structured way
scripts/checkpatch.pl | 101 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-)scripts/checkpatch.pl +99
-3@@ -506,6 +506,81 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => { + suggestion => "Suggested-by:", + rationale => "In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch", + }, + "Co-authored-by:" => { + suggestion => "Co-developed-by:", + rationale => "Co-developed-by and Co-authored-by are synonyms", + }, + "Analyzed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Analysed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analysing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Improvements-by:" => { + suggestion => "Co-developed-by:", + rationale => "Performing improvements are a part of Software Developement, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Noticed-by:" => { + suggestion => "Reported-by:", + rationale => "Reported-by and Noticed-by are synonyms", + }, + "Inspired-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Verified-by:" => { + suggestion => "Tested-by:", + rationale => "Tested-by and Verified-by are synonyms", + }, + "Okay-ished-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Acked-for-MFD-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Reviewed-off-by:" => { + suggestion => "Reviewed-by:", + rationale => "Reviewed-by is the standard signature tag for recording your approval", + }, + "Proposed-by:" => { + suggestion => "Suggested-by:", + rationale => "Proposing changes is same as suggesting changes, so Suggested-by seems perfectly fine", + }, + "Fixed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Pointed-out-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing out certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Pointed-at-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing at certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Suggestions-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Generated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. It is advised to describe about tools in commit description instead", + }, + "Celebrated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. This tag may not be required at all", + }, +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2848,30 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + my $rationale = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}{'suggestion'}; + $rationale = $standard_signature_fix{$sign_off}{'rationale'}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag. $rationale\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead. $rationale\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/; + } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF", --
Quoted 2 lines
2.17.1
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH v3] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 70 lines · Lukas Bulwahn
Quoted 69 lines · Aditya Srivastava
Currently, checkpatch.pl warns for
BAD_SIGN_OFFon non-standard signature styles.This warning occurs because of incorrect use of signature tags, e.g. an evaluation on v4.13..v5.8 showed the use of following incorrect signature tags, which may seem correct, but are not standard:
1) Requested-by (count: 48) => Suggested-by
Rationale: In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch2) Co-authored-by (count: 43) => Co-developed-by
Rationale: Co-developed-by and Co-authored-by are synonyms3) Analyzed-by (count: 22) / Analysed-by (count: 5) => Co-developed-by
Rationale: Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code4) Improvements-by (count: 19) => Co-developed-by
5) Noticed-by (count: 11) => Reported-by
6) Inspired-by (count: 11) => Suggested-by
7) Verified-by (count: 8) => Tested-by
Rationale: Used by a single user. On reading mailing list, it seems Tested-by might be a suitable alternative8) Okay-ished-by (count: 8) => Acked-by
Rationale: Used by a single user. On reading mailing list, it seems Acked-by must be suitable alternative9) Acked-for-MFD-by (count: 6) => Acked-by
10) Reviewed-off-by (count: 5) => Reviewed-by
11) Proposed-by (count: 5) => Suggested-by
Rationale: On observing the mailing list, this tag is always used for a maintainer. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same12) Fixed-by (count: 3) => Co-developed-by
Rationale: Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code13) Pointed-out-by (count: 3) / Pointed-at-by (count: 2) => Suggested-by
Rationale: The tags are used for maintainers. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same
E.g., Pointed-at-by: Greg Kroah-Hartman <[email protected]>14) Suggestions-by (count: 3) => Suggested-by
15) Generated-by (count: 17) => remove the tag
On observing the mailing list, this tag is always used for quoting the tool or script, which might have been used to generate the patch. E.g. Generated-by:scripts/coccinelle/api/alloc/kzalloc-simple.cocci16) Celebrated-by (count: 3) => remove the tag
This tag was used for only one commit. On observing mailing list, it seem like the celebration for a particular patch and changes.Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not required
Quoted 9 lines
Quoted 5 lines
Also, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature. Also provide suitable rationale to the user for the suggestion made.
Signed-off-by Aditya Srivastava <[email protected]>Looks good to me. Let us propose this to Joe for review.
Sent it. We probably still need to discuss about the remaining signatures:
1) "Debugged-by", 61
2) "Originally-by", 39
3) "Bisected-by", 20
4) "Diagnosed-by", 11
5) "Original-patch-by", 11
6) "Based-on-patch-by", 7
7) "Based-on-a-patch-by", 8
8) "Root-caused-by", 6
9) "Original-by", 6
10) "Based-on-patches-by", 5
11) "Based-on-work-by", 5
Should I send this list as a follow-up mail?
Quoted 3 lines
Also, you can already start working on the related feature for providing fixes based on the edit distance.
Okay.
Thanks
Aditya
Quoted 127 lines
With both features, we can probably fix all non-standard signatures...
Lukas
Quoted 123 lines
---
changes in v2: replace commit specific example with brief evaluationchanges in v3: provide rationale to users for every signature tag suggestion; modify commit message describing arrival to conclusion in a structured way
scripts/checkpatch.pl | 101 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-)scripts/checkpatch.pl +97
-2@@ -506,6 +506,81 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => { + suggestion => "Suggested-by:", + rationale => "In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch", + }, + "Co-authored-by:" => { + suggestion => "Co-developed-by:", + rationale => "Co-developed-by and Co-authored-by are synonyms", + }, + "Analyzed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Analysed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analysing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Improvements-by:" => { + suggestion => "Co-developed-by:", + rationale => "Performing improvements are a part of Software Developement, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Noticed-by:" => { + suggestion => "Reported-by:", + rationale => "Reported-by and Noticed-by are synonyms", + }, + "Inspired-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Verified-by:" => { + suggestion => "Tested-by:", + rationale => "Tested-by and Verified-by are synonyms", + }, + "Okay-ished-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Acked-for-MFD-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Reviewed-off-by:" => { + suggestion => "Reviewed-by:", + rationale => "Reviewed-by is the standard signature tag for recording your approval", + }, + "Proposed-by:" => { + suggestion => "Suggested-by:", + rationale => "Proposing changes is same as suggesting changes, so Suggested-by seems perfectly fine", + }, + "Fixed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Pointed-out-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing out certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Pointed-at-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing at certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Suggestions-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Generated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. It is advised to describe about tools in commit description instead", + }, + "Celebrated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. This tag may not be required at all", + }, +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2848,30 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + my $rationale = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}{'suggestion'}; + $rationale = $standard_signature_fix{$sign_off}{'rationale'}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag. $rationale\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead. $rationale\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/;
Quoted 8 lines
Quoted 8 lines
scripts/checkpatch.pl +2
-1+ } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF", --2.17.1
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Re: [Linux-kernel-mentees] [PATCH v3] checkpatch: add fix and improve warning msg for Non-standard signature
Quoted 94 lines · Aditya
Quoted 70 lines · Lukas Bulwahn
Quoted 69 lines · Aditya Srivastava
Currently, checkpatch.pl warns for
BAD_SIGN_OFFon non-standard signature styles.This warning occurs because of incorrect use of signature tags, e.g. an evaluation on v4.13..v5.8 showed the use of following incorrect signature tags, which may seem correct, but are not standard:
1) Requested-by (count: 48) => Suggested-by
Rationale: In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch2) Co-authored-by (count: 43) => Co-developed-by
Rationale: Co-developed-by and Co-authored-by are synonyms3) Analyzed-by (count: 22) / Analysed-by (count: 5) => Co-developed-by
Rationale: Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code4) Improvements-by (count: 19) => Co-developed-by
5) Noticed-by (count: 11) => Reported-by
6) Inspired-by (count: 11) => Suggested-by
7) Verified-by (count: 8) => Tested-by
Rationale: Used by a single user. On reading mailing list, it seems Tested-by might be a suitable alternative8) Okay-ished-by (count: 8) => Acked-by
Rationale: Used by a single user. On reading mailing list, it seems Acked-by must be suitable alternative9) Acked-for-MFD-by (count: 6) => Acked-by
10) Reviewed-off-by (count: 5) => Reviewed-by
11) Proposed-by (count: 5) => Suggested-by
Rationale: On observing the mailing list, this tag is always used for a maintainer. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same12) Fixed-by (count: 3) => Co-developed-by
Rationale: Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code13) Pointed-out-by (count: 3) / Pointed-at-by (count: 2) => Suggested-by
Rationale: The tags are used for maintainers. It seems that the changes might have been suggested by them and the tag is used as acknowledgement for the same
E.g., Pointed-at-by: Greg Kroah-Hartman <[email protected]>14) Suggestions-by (count: 3) => Suggested-by
15) Generated-by (count: 17) => remove the tag
On observing the mailing list, this tag is always used for quoting the tool or script, which might have been used to generate the patch. E.g. Generated-by:scripts/coccinelle/api/alloc/kzalloc-simple.cocci16) Celebrated-by (count: 3) => remove the tag
This tag was used for only one commit. On observing mailing list, it seem like the celebration for a particular patch and changes.Provide a fix by:
1) replacing the non-standard signature with its standard equivalent
2) removing the signature if it is not requiredQuoted 9 lines
Quoted 5 lines
Also, improve warning messages correspondingly, providing users suggestions to either replace or remove the signature. Also provide suitable rationale to the user for the suggestion made.
Signed-off-by Aditya Srivastava <[email protected]>Looks good to me. Let us propose this to Joe for review.
Sent it. We probably still need to discuss about the remaining signatures:
1) "Debugged-by", 61
2) "Originally-by", 39
3) "Bisected-by", 20
4) "Diagnosed-by", 11
5) "Original-patch-by", 11
6) "Based-on-patch-by", 7
7) "Based-on-a-patch-by", 8
8) "Root-caused-by", 6
9) "Original-by", 6
10) "Based-on-patches-by", 5
11) "Based-on-work-by", 5
Quoted 2 lines
Should I send this list as a follow-up mail?
Let us give Joe time to review the patch first; then if accepted, we can continue the discussion on those tags above; you can already propose a solution you have in mind and think about where the documentation, checkpatch etc. needs to be adjusted.
Quoted 134 lines
Quoted 3 lines
Also, you can already start working on the related feature for providing fixes based on the edit distance.
Okay.
Thanks
AdityaQuoted 127 lines
With both features, we can probably fix all non-standard signatures...
Lukas
Quoted 123 lines
---
changes in v2: replace commit specific example with brief evaluationchanges in v3: provide rationale to users for every signature tag suggestion; modify commit message describing arrival to conclusion in a structured way
scripts/checkpatch.pl | 101 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-)scripts/checkpatch.pl +97
-2@@ -506,6 +506,81 @@ our $signature_tags = qr{(?xi: Cc: )}; +our %standard_signature_fix = ( + "Requested-by:" => { + suggestion => "Suggested-by:", + rationale => "In an open-source project, there are no 'requests', just 'suggestions' to convince a maintainer to accept your patch", + }, + "Co-authored-by:" => { + suggestion => "Co-developed-by:", + rationale => "Co-developed-by and Co-authored-by are synonyms", + }, + "Analyzed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analyzing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Analysed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Analysing is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Improvements-by:" => { + suggestion => "Co-developed-by:", + rationale => "Performing improvements are a part of Software Developement, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Noticed-by:" => { + suggestion => "Reported-by:", + rationale => "Reported-by and Noticed-by are synonyms", + }, + "Inspired-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Verified-by:" => { + suggestion => "Tested-by:", + rationale => "Tested-by and Verified-by are synonyms", + }, + "Okay-ished-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Acked-for-MFD-by:" => { + suggestion => "Acked-by:", + rationale => "Acked-by is the standard signature tag for recording your approval", + }, + "Reviewed-off-by:" => { + suggestion => "Reviewed-by:", + rationale => "Reviewed-by is the standard signature tag for recording your approval", + }, + "Proposed-by:" => { + suggestion => "Suggested-by:", + rationale => "Proposing changes is same as suggesting changes, so Suggested-by seems perfectly fine", + }, + "Fixed-by:" => { + suggestion => "Co-developed-by:", + rationale => "Fixing bug is a part of Software Development, so 'Co-developed-by' is perfectly fine, even if contributor did not create code", + }, + "Pointed-out-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing out certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Pointed-at-by:" => { + suggestion => "Suggested-by:", + rationale => "Pointing at certain changes is synonymous to suggesting changes, so Suggested-by seems perfectly fine", + }, + "Suggestions-by:" => { + suggestion => "Suggested-by:", + rationale => "Suggested-by is the standard signature tag for acknowledging user for their suggestions", + }, + "Generated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. It is advised to describe about tools in commit description instead", + }, + "Celebrated-by:" => { + suggestion => "remove", + rationale => "Signature tags are used to acknowledge users for their contributions. This tag may not be required at all", + }, +); + our @typeListMisordered = ( qr{char\s+(?:un)?signed}, qr{int\s+(?:(?:un)?signed\s+)?short\s},@@ -2773,8 +2848,30 @@ sub process { my $ucfirst_sign_off = ucfirst(lc($sign_off)); if ($sign_off !~ /$signature_tags/) { - WARN("BAD_SIGN_OFF", - "Non-standard signature: $sign_off\n" . $herecurr); + my $suggested_signature = ""; + my $rationale = ""; + if (exists($standard_signature_fix{$sign_off})) { + $suggested_signature = $standard_signature_fix{$sign_off}{'suggestion'}; + $rationale = $standard_signature_fix{$sign_off}{'rationale'}; + } + if ($suggested_signature eq "") { + WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off\n" . $herecurr); + } + elsif ($suggested_signature eq "remove") { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please consider removing this signature tag. $rationale\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } + } + else { + if (WARN("BAD_SIGN_OFF", + "Non-standard signature: $sign_off. Please use '$suggested_signature' instead. $rationale\n" . $herecurr) && + $fix) { + $fixed[$fixlinenr] =~ s/$sign_off/$suggested_signature/;
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
scripts/checkpatch.pl +2
-1+ } + } } if (defined $space_before && $space_before ne "") { if (WARN("BAD_SIGN_OFF", --2.17.1
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees