LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* linux-next: manual merge of the akpm tree with the btrfs tree
@ 2020-01-07  5:25 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2020-01-07  5:25 UTC (permalink / raw)
  To: Andrew Morton, David Sterba
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Dennis Zhou

[-- Attachment #1: Type: text/plain, Size: 2645 bytes --]

Hi all,

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

  include/linux/bitmap.h

between commit:

  7a5ce045d17c ("bitmap: genericize percpu bitmap region iterators")

from the btrfs tree and patch:

  "lib: rework bitmap_parse()"

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

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/bitmap.h
index cb63feb3cfbe,65994b9f68f3..000000000000
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@@ -450,47 -450,6 +450,41 @@@ static inline void bitmap_replace(unsig
  		__bitmap_replace(dst, old, new, mask, nbits);
  }
  
- static inline int bitmap_parse(const char *buf, unsigned int buflen,
- 			unsigned long *maskp, int nmaskbits)
- {
- 	return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits);
- }
- 
 +static inline void bitmap_next_clear_region(unsigned long *bitmap,
 +					    unsigned int *rs, unsigned int *re,
 +					    unsigned int end)
 +{
 +	*rs = find_next_zero_bit(bitmap, end, *rs);
 +	*re = find_next_bit(bitmap, end, *rs + 1);
 +}
 +
 +static inline void bitmap_next_set_region(unsigned long *bitmap,
 +					  unsigned int *rs, unsigned int *re,
 +					  unsigned int end)
 +{
 +	*rs = find_next_bit(bitmap, end, *rs);
 +	*re = find_next_zero_bit(bitmap, end, *rs + 1);
 +}
 +
 +/*
 + * Bitmap region iterators.  Iterates over the bitmap between [@start, @end).
 + * @rs and @re should be integer variables and will be set to start and end
 + * index of the current clear or set region.
 + */
 +#define bitmap_for_each_clear_region(bitmap, rs, re, start, end)	     \
 +	for ((rs) = (start),						     \
 +	     bitmap_next_clear_region((bitmap), &(rs), &(re), (end));	     \
 +	     (rs) < (re);						     \
 +	     (rs) = (re) + 1,						     \
 +	     bitmap_next_clear_region((bitmap), &(rs), &(re), (end)))
 +
 +#define bitmap_for_each_set_region(bitmap, rs, re, start, end)		     \
 +	for ((rs) = (start),						     \
 +	     bitmap_next_set_region((bitmap), &(rs), &(re), (end));	     \
 +	     (rs) < (re);						     \
 +	     (rs) = (re) + 1,						     \
 +	     bitmap_next_set_region((bitmap), &(rs), &(re), (end)))
 +
  /**
   * BITMAP_FROM_U64() - Represent u64 value in the format suitable for bitmap.
   * @n: u64 value

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-07  5:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07  5:25 linux-next: manual merge of the akpm tree with the btrfs tree Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).