checkpatch: add fixes for BAD_SIGN_OFF
PATCH 1/1 checkpatch: add fixes for BAD_SIGN_OFF
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit 6dd47d9754ff ("mac80211: fix ieee80211_txq_setup_flows() failure path") we get warning:
WARNING: Duplicate signature
Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit 6e88559470f5 ("Documentation: Add section about CPU vulnerabilities for Spectre") we get:
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
--- scripts/checkpatch.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
scripts/checkpatch.pl +10 -4
@@ -2818,8 +2818,11 @@ sub process { $sig_nospace =~ s/\s//g; $sig_nospace = lc($sig_nospace); if (defined $signatures{$sig_nospace}) { - WARN("BAD_SIGN_OFF", - "Duplicate signature\n" . $herecurr); + if (WARN("BAD_SIGN_OFF", + "Duplicate signature\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } } else { $signatures{$sig_nospace} = 1; }
@@ -2827,8 +2830,11 @@ sub process { # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email if ($sign_off =~ /^co-developed-by:$/i) { if ($email eq $author) { - WARN("BAD_SIGN_OFF", - "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline); + if (WARN("BAD_SIGN_OFF", + "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } } if (!defined $lines[$linenr]) { 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
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:
Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
A patch shall only do ONE thing. I see two here.
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Quoted 38 lines
Signed-off-by Aditya Srivastava <[email protected]>--- scripts/checkpatch.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)scripts/checkpatch.pl +10
-5@@ -2818,8 +2818,11 @@ sub process { $sig_nospace =~ s/\s//g; $sig_nospace = lc($sig_nospace); if (defined $signatures{$sig_nospace}) { - WARN("BAD_SIGN_OFF", - "Duplicate signature\n" . $herecurr); + if (WARN("BAD_SIGN_OFF", + "Duplicate signature\n" . $herecurr) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } } else { $signatures{$sig_nospace} = 1; }@@ -2827,8 +2830,11 @@ sub process { # Check Co-developed-by: immediately followed by Signed-off-by: with same name and email if ($sign_off =~ /^co-developed-by:$/i) { if ($email eq $author) { - WARN("BAD_SIGN_OFF", - "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline); + if (WARN("BAD_SIGN_OFF", + "Co-developed-by: should not be used to attribute nominal patch author '$author'\n" . "$here\n" . $rawline) && + $fix) { + fix_delete_line($fixlinenr, $rawline); + } } if (!defined $lines[$linenr]) { 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
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:
Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28
IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
How about other prefixes. Can we remove them?
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Here tested-by is occurring 2 times.
Quoted 1 line
A patch shall only do ONE thing. I see two here.
I'll remove the fix for Duplicate Signature from this patch.
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 61 lines · Aditya
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Quoted 6 lines
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
That is somehow difficult to say, but probably it is best to deactivate this multiple Signed-off-by: warning on git commits.
On patches it makes sense to warn about duplicate Signed-off-by: ; on commits, not so much.
Quoted 2 lines
How about other prefixes. Can we remove them?
Can you show the duplicate Tested-by, Acked-by, Reported-by, Reviewed-by, Cc in some structured format to quickly check those?
Probably for those, we can really assess them to be all true positives (maybe we can find out the reasons as well) and hence a fix for them would make sense.
Quoted 12 lines
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Signed-off-by Martin Blumenstingl <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Signed-off-by Miquel Raynal <[email protected]>Here tested-by is occurring 2 times.
That example seems to be a clear true positive. It would be interesting to see how that happened to be added twice in a commit. What was the state on the mailing list and what did the maintainer do to add these tags twice (was this done manually or is there some automatic tool involved?).
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 78 lines · Lukas Bulwahn
Quoted 61 lines · Aditya
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Quoted 6 lines
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
That is somehow difficult to say, but probably it is best to deactivate this multiple Signed-off-by: warning on git commits.
On patches it makes sense to warn about duplicate Signed-off-by: ; on commits, not so much.
Quoted 2 lines
How about other prefixes. Can we remove them?
Quoted 7 lines
Can you show the duplicate Tested-by, Acked-by, Reported-by, Reviewed-by, Cc in some structured format to quickly check those?
Probably for those, we can really assess them to be all true positives (maybe we can find out the reasons as well) and hence a fix for them would make sense.
I generated git logs of all such commits, which might help us get some idea about mailing list or sign offs as well.
Acked-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/acked_by.txt
Reported-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reported_by.txt
Reviewed by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reviewed_by.txt
Tested-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/tested_by.txt
Quoted 10 lines
Quoted 10 lines
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Signed-off-by Martin Blumenstingl <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Signed-off-by Miquel Raynal <[email protected]>
Quoted 9 lines
Quoted 2 lines
Here tested-by is occurring 2 times.
That example seems to be a clear true positive. It would be interesting to see how that happened to be added twice in a commit. What was the state on the mailing list and what did the maintainer do to add these tags twice (was this done manually or is there some automatic tool involved?).
I found the mailing list state corresponding to that day. It indeed seems like a true positive.
Link2 (reply):
https://lore.kernel.org/linux-mtd/[email protected]/
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 125 lines · Aditya
Quoted 78 lines · Lukas Bulwahn
Quoted 61 lines · Aditya
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Quoted 6 lines
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
That is somehow difficult to say, but probably it is best to deactivate this multiple Signed-off-by: warning on git commits.
On patches it makes sense to warn about duplicate Signed-off-by: ; on commits, not so much.
Quoted 2 lines
How about other prefixes. Can we remove them?
Quoted 7 lines
Can you show the duplicate Tested-by, Acked-by, Reported-by, Reviewed-by, Cc in some structured format to quickly check those?
Probably for those, we can really assess them to be all true positives (maybe we can find out the reasons as well) and hence a fix for them would make sense.
I generated git logs of all such commits, which might help us get some idea about mailing list or sign offs as well.
Acked-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/acked_by.txtReported-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reported_by.txtReviewed by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reviewed_by.txtTested-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/tested_by.txtQuoted 10 lines
Quoted 10 lines
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Signed-off-by Martin Blumenstingl <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Signed-off-by Miquel Raynal <[email protected]>Quoted 9 lines
Quoted 2 lines
Here tested-by is occurring 2 times.
That example seems to be a clear true positive. It would be interesting to see how that happened to be added twice in a commit. What was the state on the mailing list and what did the maintainer do to add these tags twice (was this done manually or is there some automatic tool involved?).
Quoted 9 lines
I found the mailing list state corresponding to that day. It indeed seems like a true positive.
Link2 (reply):
https://lore.kernel.org/linux-mtd/[email protected]/
Yes, and it suggest to fix patchwork :)
How are your python programming skills?
Do you want to try fixing patchwork for this issue?
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 139 lines · Lukas Bulwahn
Quoted 125 lines · Aditya
Quoted 78 lines · Lukas Bulwahn
Quoted 61 lines · Aditya
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Quoted 6 lines
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
That is somehow difficult to say, but probably it is best to deactivate this multiple Signed-off-by: warning on git commits.
On patches it makes sense to warn about duplicate Signed-off-by: ; on commits, not so much.
Quoted 2 lines
How about other prefixes. Can we remove them?
Quoted 7 lines
Can you show the duplicate Tested-by, Acked-by, Reported-by, Reviewed-by, Cc in some structured format to quickly check those?
Probably for those, we can really assess them to be all true positives (maybe we can find out the reasons as well) and hence a fix for them would make sense.
I generated git logs of all such commits, which might help us get some idea about mailing list or sign offs as well.
Acked-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/acked_by.txtReported-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reported_by.txtReviewed by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reviewed_by.txtTested-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/tested_by.txtQuoted 10 lines
Quoted 10 lines
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Signed-off-by Martin Blumenstingl <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Signed-off-by Miquel Raynal <[email protected]>Quoted 9 lines
Quoted 2 lines
Here tested-by is occurring 2 times.
That example seems to be a clear true positive. It would be interesting to see how that happened to be added twice in a commit. What was the state on the mailing list and what did the maintainer do to add these tags twice (was this done manually or is there some automatic tool involved?).
Quoted 9 lines
I found the mailing list state corresponding to that day. It indeed seems like a true positive.
Link2 (reply):
https://lore.kernel.org/linux-mtd/[email protected]/
Quoted 8 lines
Yes, and it suggest to fix patchwork :)
How are your python programming skills?
Do you want to try fixing patchwork for this issue?
Lukas
Sure, I'd like to try. Please guide me for it.
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 142 lines · Aditya
Quoted 141 lines · Lukas Bulwahn
Quoted 125 lines · Aditya
Quoted 78 lines · Lukas Bulwahn
Quoted 61 lines · Aditya
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Quoted 6 lines
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
That is somehow difficult to say, but probably it is best to deactivate this multiple Signed-off-by: warning on git commits.
On patches it makes sense to warn about duplicate Signed-off-by: ; on commits, not so much.
Quoted 2 lines
How about other prefixes. Can we remove them?
Quoted 7 lines
Can you show the duplicate Tested-by, Acked-by, Reported-by, Reviewed-by, Cc in some structured format to quickly check those?
Probably for those, we can really assess them to be all true positives (maybe we can find out the reasons as well) and hence a fix for them would make sense.
I generated git logs of all such commits, which might help us get some idea about mailing list or sign offs as well.
Acked-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/acked_by.txtReported-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reported_by.txtReviewed by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reviewed_by.txtTested-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/tested_by.txtQuoted 10 lines
Quoted 10 lines
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Signed-off-by Martin Blumenstingl <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Signed-off-by Miquel Raynal <[email protected]>Quoted 9 lines
Quoted 2 lines
Here tested-by is occurring 2 times.
That example seems to be a clear true positive. It would be interesting to see how that happened to be added twice in a commit. What was the state on the mailing list and what did the maintainer do to add these tags twice (was this done manually or is there some automatic tool involved?).
Quoted 9 lines
I found the mailing list state corresponding to that day. It indeed seems like a true positive.
Link2 (reply):
https://lore.kernel.org/linux-mtd/[email protected]/Yes, and it suggest to fix patchwork :)
Quoted 9 lines
Quoted 6 lines
How are your python programming skills?
Do you want to try fixing patchwork for this issue?
Lukas
Sure, I'd like to try. Please guide me for it.
I might have got it wrong. Did you mean fixing the patch we are working on currently?
I must be intermediate with Python, not too expert though(like 3.5/5)
Thanks
Aditya
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Quoted 151 lines · Aditya
Quoted 149 lines · Aditya
Quoted 147 lines · Lukas Bulwahn
Quoted 125 lines · Aditya
Quoted 78 lines · Lukas Bulwahn
Quoted 61 lines · Aditya
Quoted 30 lines · Lukas Bulwahn
Quoted 17 lines · Aditya Srivastava
Currently, checkpatch warns if the author signs-off two or more times for the same role.
E.g., for commit6dd47d9754ff("mac80211: fixieee80211_txq_setup_flows()failure path") we get warning:WARNING: Duplicate signature
Signed-off-by Johannes Berg <[email protected]>Here there are two Signed-off-by lines present for the same user. So, we get a warning to remove one.
Similarly, we get warning if the author of the commit signs-off under co-developed-by.
E.g. for commit6e88559470f5("Documentation: Add section about CPU vulnerabilities for Spectre") we get:Quoted 7 lines
WARNING: Co-developed-by: should not be used to attribute nominal patch author 'Tim Chen <[email protected]>'
Co-developed-by Tim Chen <[email protected]>Provide fixes by removing the duplicate signature line and the co-developed-by line from the commit
The duplicate signature fix is simply wrong, because the indication of the duplicate signature is imprecise.
Quoted 8 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Please rework.
Lukas
Oh, Alright. I get it now.
I ran a script over WARNING: Duplicate signature.
I found out that it is occurring with these prefixes and their frequencies:Acked-by -- 6
Signed-off-by -- 218
Tested-by -- 3
Reported-by -- 1
Reviewed-by -- 8
Cc -- 28IMO largely Signed-off-by warnings in this frequency might be false positives. This is so because we are simply checking for duplicate occurrences in the sign-offs in checkpatch.pl
Quoted 3 lines
Probably, we would first really need to understand the valid cases of duplicate signature warnings compared to the invalid ones.
Quoted 6 lines
Is there any way I can know that the second sign-off is intended?
In my observation, this particular commit was prefixed by '^Link:.*$' Alternatively, we could use maintainers list to ensure that the signer is maintainer and avoid this warning.
That is somehow difficult to say, but probably it is best to deactivate this multiple Signed-off-by: warning on git commits.
On patches it makes sense to warn about duplicate Signed-off-by: ; on commits, not so much.
Quoted 2 lines
How about other prefixes. Can we remove them?
Quoted 7 lines
Can you show the duplicate Tested-by, Acked-by, Reported-by, Reviewed-by, Cc in some structured format to quickly check those?
Probably for those, we can really assess them to be all true positives (maybe we can find out the reasons as well) and hence a fix for them would make sense.
I generated git logs of all such commits, which might help us get some idea about mailing list or sign offs as well.
Acked-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/acked_by.txtReported-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reported_by.txtReviewed by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/reviewed_by.txtTested-by:
https://github.com/AdityaSrivast/kernel-tasks/blob/master/Task5/tested_by.txtQuoted 10 lines
Quoted 10 lines
I observed one of the 'Tested-by' warnings and it was because of these sign offs:
Signed-off-by Martin Blumenstingl <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Tested-by Liang Yang <[email protected]>Acked-by Liang Yang <[email protected]>Signed-off-by Miquel Raynal <[email protected]>Quoted 9 lines
Quoted 2 lines
Here tested-by is occurring 2 times.
That example seems to be a clear true positive. It would be interesting to see how that happened to be added twice in a commit. What was the state on the mailing list and what did the maintainer do to add these tags twice (was this done manually or is there some automatic tool involved?).
Quoted 9 lines
I found the mailing list state corresponding to that day. It indeed seems like a true positive.
Link2 (reply):
https://lore.kernel.org/linux-mtd/[email protected]/Yes, and it suggest to fix patchwork :)
How are your python programming skills?
Do you want to try fixing patchwork for this issue?
Lukas
Quoted 7 lines
Quoted 2 lines
Sure, I'd like to try. Please guide me for it.
I might have got it wrong. Did you mean fixing the patch we are working on currently?
I must be intermediate with Python, not too expert though(like 3.5/5)
No, I meant the program patchwork; read the thread and learn how the problem was picked up in this patch.
Lukas
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees