From: Sebastian Ott Date: Tue, 6 Nov 2012 14:10:05 +0000 (+0100) Subject: s390/cio: fix length calculation in idset.c X-Git-Tag: upstream/snapshot3+hdmi~6280^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f0bc6c0d45497a0191e99426785954bcbda3c6c;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: aa92b33 s390/cio: use generic bitmap functions Reported-by: Christian Ehrhardt Acked-by: Peter Oberparleiter Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/cio/idset.c b/drivers/s390/cio/idset.c index 199bc67..65d13e3 100644 --- a/drivers/s390/cio/idset.c +++ b/drivers/s390/cio/idset.c @@ -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); }