Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f0bc6c0 authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

s390/cio: fix length calculation in idset.c



bitmap_or uses the number of bits as its length parameter and
not the number of words necessary to store those bits.

This fixes a regression introduced by:
	aa92b33c s390/cio: use generic bitmap functions

Reported-by: default avatarChristian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Acked-by: default avatarPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 99e639b7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -125,8 +125,7 @@ int idset_is_empty(struct idset *set)

void idset_add_set(struct idset *to, struct idset *from)
{
	int len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
		      __BITOPS_WORDS(from->num_ssid * from->num_id));
	int len = min(to->num_ssid * to->num_id, from->num_ssid * from->num_id);

	bitmap_or(to->bitmap, to->bitmap, from->bitmap, len);
}