Skip to contentSkip to conversation

linux-next: manual merge of the ftrace tree with Linus' tree

PATCH Stephen Rothwell 2 participants 2 messages Jan 8, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

scripts/sorttable.h

between commit:

0210d251162f ("scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity")

from Linus' tree and commit:

4f1d0c914628 ("scripts/sorttable: Move code from sorttable.h into sorttable.c")

from the ftrace tree.

I fixed it up (I deleted the file and applied the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Wed, 8 Jan 2025 13:23:17 +1100
Subject: [PATCH] fix up for "scripts/sorttable: Move code from sorttable.h
into sorttable.c"

interacting with commit

0210d251162f ("scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity")

from Linus' tree.

---
 scripts/sorttable.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/sorttable.c +4 -1
index cd3b2145a827..656c1e9b5ad9 100644
@@ -368,7 +368,7 @@ static inline unsigned long orc_ip(const int *ip)
 
 static int orc_sort_cmp(const void *_a, const void *_b)
 {
-	struct orc_entry *orc_a;
+	struct orc_entry *orc_a, *orc_b;
 	const int *a = g_orc_ip_table + *(int *)_a;
 	const int *b = g_orc_ip_table + *(int *)_b;
 	unsigned long a_val = orc_ip(a);
@@ -386,6 +386,9 @@ static int orc_sort_cmp(const void *_a, const void *_b)
 	 * whitelisted .o files which didn't get objtool generation.
 	 */
 	orc_a = g_orc_table + (a - g_orc_ip_table);
+	orc_b = g_orc_table + (b - g_orc_ip_table);
+	if (orc_a->type == ORC_TYPE_UNDEFINED && orc_b->type == ORC_TYPE_UNDEFINED)
+		return 0;
 	return orc_a->type == ORC_TYPE_UNDEFINED ? -1 : 1;
 }
 
Signature · 5 lines
2.45.2

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 28 lines · On Wed, 8 Jan 2025 13:32:07 +1100 Stephen Rothwell <[email protected]> wrote:

Hi all,

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

scripts/sorttable.h

between commit:

0210d251162f ("scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity")

from Linus' tree and commit:

4f1d0c914628 ("scripts/sorttable: Move code from sorttable.h into sorttable.c")

from the ftrace tree.

I fixed it up (I deleted the file and applied the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Wed, 8 Jan 2025 13:23:17 +1100
Subject: [PATCH] fix up for "scripts/sorttable: Move code from sorttable.h
into sorttable.c"

Quoted 5 lines

interacting with commit

0210d251162f ("scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity")

from Linus' tree.

Thanks for letting me know. I'll likely just rebase it on v6.13-rc6 and retest it.

-- Steve