Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6017926ybc; Wed, 27 Nov 2019 13:29:44 -0800 (PST) X-Google-Smtp-Source: APXvYqy8N0IR8TMzM6TC7e59+aO37po8ECgXgikhtVU4S6tRn8SxdJS3cJdrjcJ67Jbs73alziok X-Received: by 2002:a17:907:11cc:: with SMTP id va12mr31578835ejb.164.1574890183918; Wed, 27 Nov 2019 13:29:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890183; cv=none; d=google.com; s=arc-20160816; b=XCexhPowOGLl6aiEbJ5VNb4OGos2CkQ2c04sqoEA5+zpbbR1yXn7GJ9qfAuHbUQ99q MWPPMVsR1yyfRbtIjNAZ92PDepl5/7MCs59iEktdK5+2zlSXQKEVoxTp4bmtL0k47Dix qqU5gJIm/MJMom6EnMhTLUyDh4wsz6jLpqMCWqb2DfN1OrZGvQcarKD4BST2NsVo7pqP bcD0i+8uoD0u/NUMDWosAxQMApPpWzL3yLw/8QHnSQWOofEq++HlbFSC7HNDPd+Om2nd HsZPGiYZYUWdUJHVPvcBvJGjGaxt7qPFp3Bz98kyxXhRs41LdaWCGx02FSrAwWlRth7H S8Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=r2GSyBsaimieONzaw+LoLkmTqps5LPgmTaozyzWUhAo=; b=jHZ0n+7pxoTV+jGB+yvRxV0g242DUvqxzUDGGYr2toTAZxIb9A+QYqiAJTAkOp4/S8 Ll8R0aKQuzZIwqN0rTuGBrwupL717pPDrAPQ86s6DWzaXDYP66/iJEpbkvlSSzmqqu9N UPLdBxIX/z7WyptC2DafpvO6Butngm7YpCSqrcugBEbvtysXeucNaOgic7RukzF8jpgL 6zkFoL8gILo4f441HK5J9F0Vg7qk6kfiTZVVFcoXIlQr6gu9Tel0RbLlqYqC8MsCiN8l Az3A4rvD1Fjx0CBkuJU9iid0YUfZlkoLiIxBD3EWo1UGfT9407nAGVFp4jBNw6Ym6XBH 4u5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HxnnfBs2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd21si4915769edb.111.2019.11.27.13.29.20; Wed, 27 Nov 2019 13:29:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HxnnfBs2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731834AbfK0VCI (ORCPT + 99 others); Wed, 27 Nov 2019 16:02:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:54604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731824AbfK0VCG (ORCPT ); Wed, 27 Nov 2019 16:02:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2366B2084B; Wed, 27 Nov 2019 21:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888525; bh=dxoXWgxQRR9fmVdKQXfwIFqkFeZZdUdB1tLsIwrsVh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HxnnfBs2Oqc9sAOX76HFW0vJCQCurlOPe4Kubx4UIpcmQE5fsr7mY4zlKmIb2Qnv7 uVFh5/v2UsBRp0Ii8caVB+FsZQnvJpGtljoQmxlg8hraF8na6dhm/PYjIvJc8PSqT2 CMPlyhWmwpgg7flbf1ykziE+mRnkjKu3YZ8EJGF4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rasmus Villemoes , Yury Norov , Andy Shevchenko , Sudeep Holla , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.19 168/306] linux/bitmap.h: fix type of nbits in bitmap_shift_right() Date: Wed, 27 Nov 2019 21:30:18 +0100 Message-Id: <20191127203127.677195756@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rasmus Villemoes [ Upstream commit d9873969fa8725dc6a5a21ab788c057fd8719751 ] Most other bitmap API, including the OOL version __bitmap_shift_right, take unsigned nbits. This was accidentally left out from 2fbad29917c98. Link: http://lkml.kernel.org/r/20180818131623.8755-5-linux@rasmusvillemoes.dk Fixes: 2fbad29917c98 ("lib: bitmap: change bitmap_shift_right to take unsigned parameters") Signed-off-by: Rasmus Villemoes Reported-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Sudeep Holla Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- include/linux/bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index a9805bacbd7ca..b71a033c781ef 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -403,7 +403,7 @@ static __always_inline void bitmap_clear(unsigned long *map, unsigned int start, } static inline void bitmap_shift_right(unsigned long *dst, const unsigned long *src, - unsigned int shift, int nbits) + unsigned int shift, unsigned int nbits) { if (small_const_nbits(nbits)) *dst = (*src & BITMAP_LAST_WORD_MASK(nbits)) >> shift; -- 2.20.1