Skip to contentSkip to conversation

linux-next: manual merge of the bitmap tree with the random tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Oct 7, 2022 – Oct 11, 2022 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

include/linux/nodemask.h

between commit:

82f33a32b4d2 ("treewide: use prandom_u32_max() when possible")

from the random tree and commit:

97848c10f9f8 ("lib/bitmap: remove bitmap_ord_to_pos")

from the bitmap 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 · 18 lines
Cheers,
Stephen Rothwell

diff --cc include/linux/nodemask.h
index 66ee9b4b7925,0c45fb066caa..000000000000
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@@ -508,8 -508,7 +508,7 @@@ static inline int node_random(const nod
  
  	w = nodes_weight(*maskp);
  	if (w)
- 		bit = bitmap_ord_to_pos(maskp->bits,
- 			prandom_u32_max(w), MAX_NUMNODES);
 -		bit = find_nth_bit(maskp->bits, MAX_NUMNODES, get_random_int() % w);
++		bit = find_nth_bit(maskp->bits, MAX_NUMNODES, prandom_u32_max(w));
  	return bit;
  #else
  	return 0;
#1 lore raw

Hi all,

Quoted 28 lines · On Fri, 7 Oct 2022 16:14:11 +1100 Stephen Rothwell <[email protected]> wrote:

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

include/linux/nodemask.h

between commit:

82f33a32b4d2 ("treewide: use prandom_u32_max() when possible")

from the random tree and commit:

97848c10f9f8 ("lib/bitmap: remove bitmap_ord_to_pos")

from the bitmap 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.

include/linux/nodemask.h +0 -0
diff --cc include/linux/nodemask.h
index 66ee9b4b7925,0c45fb066caa..000000000000

include/linux/nodemask.h

Quoted 10 lines
include/linux/nodemask.h +1 -2
@@@ -508,8 -508,7 +508,7 @@@ static inline int node_random(const nod
 
  	w = nodes_weight(*maskp);
  	if (w)
- 		bit = bitmap_ord_to_pos(maskp->bits,
- 			prandom_u32_max(w), MAX_NUMNODES);
 -		bit = find_nth_bit(maskp->bits, MAX_NUMNODES, get_random_int() % w);
++		bit = find_nth_bit(maskp->bits, MAX_NUMNODES, prandom_u32_max(w));
  	return bit;
  #else
  	return 0;

This is now a conflict between the random tree and Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 33 lines · Stephen Rothwell

Hi all,

Quoted 29 lines · On Fri, 7 Oct 2022 16:14:11 +1100 Stephen Rothwell <[email protected]> wrote:

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

include/linux/nodemask.h

between commit:

82f33a32b4d2 ("treewide: use prandom_u32_max() when possible")

from the random tree and commit:

97848c10f9f8 ("lib/bitmap: remove bitmap_ord_to_pos")

from the bitmap 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.

include/linux/nodemask.h +0 -0
diff --cc include/linux/nodemask.h
index 66ee9b4b7925,0c45fb066caa..000000000000
@@@ -508,8 -508,7 +508,7 @@@ static inline int node_random(const nod
Quoted 11 lines

include/linux/nodemask.h

Quoted 9 lines
      w = nodes_weight(*maskp);
      if (w)
include/linux/nodemask.h +1 -2
-             bit = bitmap_ord_to_pos(maskp->bits,
-                     prandom_u32_max(w), MAX_NUMNODES);
 -            bit = find_nth_bit(maskp->bits, MAX_NUMNODES, get_random_int() % w);
++            bit = find_nth_bit(maskp->bits, MAX_NUMNODES, prandom_u32_max(w));
      return bit;
  #else
      return 0;

This is now a conflict between the random tree and Linus' tree.

Thanks. I'll sort it out.

Jason