Skip to contentSkip to conversation

linux-next: manual merge of the jc_docs tree with the mm tree

DISCUSSION Stephen Rothwell 3 participants 4 messages Jan 5, 2025 – Jan 22, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the jc_docs tree got a conflict in:

scripts/checkpatch.pl

between commit:

253f01394dc0 ("checkpatch: check return of git_commit_info")

from the mm-nonmm-unstable branch of the mm tree and commit:

6356f18f09dc ("Align git commit ID abbreviation guidelines and checks")

from the jc_docs tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 25 lines
Cheers,
Stephen Rothwell

diff --cc scripts/checkpatch.pl
index 744328d21eb8,f7087dda9ac9..000000000000
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@@ -3237,12 -3237,12 +3237,12 @@@ sub process 
  			my ($cid, $ctitle) = git_commit_info($orig_commit, $id,
  							     $title);
  
 -			if ($ctitle ne $title || $tag_case || $tag_space ||
 -			    $id_length || $id_case || !$title_has_quotes) {
 +			if (defined($cid) && ($ctitle ne $title || $tag_case || $tag_space || $id_length || $id_case || !$title_has_quotes)) {
 +				my $fixed = "Fixes: $cid (\"$ctitle\")";
  				if (WARN("BAD_FIXES_TAG",
- 				     "Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
 -				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: 'Fixes: $cid (\"$ctitle\")'\n" . $herecurr) &&
++				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
  				    $fix) {
 -					$fixed[$fixlinenr] = "Fixes: $cid (\"$ctitle\")";
 +					$fixed[$fixlinenr] = $fixed;
  				}
  			}
  		}
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the jc_docs tree got a conflict in:

scripts/checkpatch.pl

between commit:

253f01394dc0 ("checkpatch: check return of git_commit_info")

from the mm-nonmm-unstable branch of the mm tree and commit:

6356f18f09dc ("Align git commit ID abbreviation guidelines and checks")

Quoted 8 lines

from the jc_docs tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

The fix looks fine, but...

Quoted 10 lines
Signature · 2 lines
Cheers,
Stephen Rothwell
scripts/checkpatch.pl +0 -0
diff --cc scripts/checkpatch.pl
index 744328d21eb8,f7087dda9ac9..000000000000
@@@ -3237,12 -3237,12 +3237,12 @@@ sub process 
  			my ($cid, $ctitle) = git_commit_info($orig_commit, $id,

scripts/checkpatch.pl

Quoted 10 lines
scripts/checkpatch.pl +1 -1
  							     $title);
 
 -			if ($ctitle ne $title || $tag_case || $tag_space ||
 -			    $id_length || $id_case || !$title_has_quotes) {
 +			if (defined($cid) && ($ctitle ne $title || $tag_case || $tag_space || $id_length || $id_case || !$title_has_quotes)) {
 +				my $fixed = "Fixes: $cid (\"$ctitle\")";
  				if (WARN("BAD_FIXES_TAG",
- 				     "Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
 -				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: 'Fixes: $cid (\"$ctitle\")'\n" . $herecurr) &&
++				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&

...it all comes down to a single "+" sign here. If 253f01394dc0 could be tweaked to add that character, I think this conflict would go away and we wouldn't make Linus delve into Perl code...?

Just a thought.

Thanks,

jon

#2 lore raw
Quoted 6 lines · On Mon, 06 Jan 2025 08:05:21 -0700 Jonathan Corbet <[email protected]> wrote:
Quoted 6 lines
scripts/checkpatch.pl +0 -0
@@@ -3237,12 -3237,12 +3237,12 @@@ sub process 
  			my ($cid, $ctitle) = git_commit_info($orig_commit, $id,
  							     $title);
Quoted 12 lines

scripts/checkpatch.pl

Quoted 8 lines

- if ($ctitle ne $title || $tag_case || $tag_space ||
- $id_length || $id_case || !$title_has_quotes) {
+ if (defined($cid) && ($ctitle ne $title || $tag_case || $tag_space || $id_length || $id_case || !$title_has_quotes)) {
+ my $fixed = "Fixes: $cid (\"$ctitle\")";
if (WARN("BAD_FIXES_TAG",

scripts/checkpatch.pl +1 -1
- 				     "Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
 -				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: 'Fixes: $cid (\"$ctitle\")'\n" . $herecurr) &&
++				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&

...it all comes down to a single "+" sign here. If 253f01394dc0 could be tweaked to add that character, I think this conflict would go away and we wouldn't make Linus delve into Perl code...?

Sure, I added this:

scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-check-return-of-git_commit_info-fix +1 -1
@@ -3240,7 +3240,7 @@ sub process {
 			if (defined($cid) && ($ctitle ne $title || $tag_case || $tag_space || $id_length || $id_case || !$title_has_quotes)) {
 				my $fixed = "Fixes: $cid (\"$ctitle\")";
 				if (WARN("BAD_FIXES_TAG",
-				     "Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
+				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
 				    $fix) {
 					$fixed[$fixlinenr] = $fixed;
 				}

_

#3 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 38 lines · On Mon, 6 Jan 2025 09:58:26 +1100 Stephen Rothwell <[email protected]> wrote:

Today's linux-next merge of the jc_docs tree got a conflict in:

scripts/checkpatch.pl

between commit:

253f01394dc0 ("checkpatch: check return of git_commit_info")

from the mm-nonmm-unstable branch of the mm tree and commit:

6356f18f09dc ("Align git commit ID abbreviation guidelines and checks")

from the jc_docs tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 2 lines
Cheers,
Stephen Rothwell
scripts/checkpatch.pl +0 -0
diff --cc scripts/checkpatch.pl
index 744328d21eb8,f7087dda9ac9..000000000000
@@@ -3237,12 -3237,12 +3237,12 @@@ sub process 
  			my ($cid, $ctitle) = git_commit_info($orig_commit, $id,
  							     $title);
 
 -			if ($ctitle ne $title || $tag_case || $tag_space ||
 -			    $id_length || $id_case || !$title_has_quotes) {
 +			if (defined($cid) && ($ctitle ne $title || $tag_case || $tag_space || $id_length || $id_case || !$title_has_quotes)) {
 +				my $fixed = "Fixes: $cid (\"$ctitle\")";

scripts/checkpatch.pl

Quoted 10 lines
scripts/checkpatch.pl +1 -1
  				if (WARN("BAD_FIXES_TAG",
- 				     "Please use correct Fixes: style 'Fixes: <12 chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
 -				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: 'Fixes: $cid (\"$ctitle\")'\n" . $herecurr) &&
++				     "Please use correct Fixes: style 'Fixes: <12+ chars of sha1> (\"<title line>\")' - ie: '$fixed'\n" . $herecurr) &&
  				    $fix) {
 -					$fixed[$fixlinenr] = "Fixes: $cid (\"$ctitle\")";
 +					$fixed[$fixlinenr] = $fixed;
  				}
  			}
  		}

This is now a conflict between Linus' tree and the nn-nonmm-stable tree.

Signature · 2 lines
Cheers,
Stephen Rothwell