From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 192BFC432C0 for ; Wed, 27 Nov 2019 21:39:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB39520869 for ; Wed, 27 Nov 2019 21:39:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574890772; bh=RO3NcGmMVyAPo8SoPW9CsQgCU3aD96mHNIyXuVrwtxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a6sToGJ1du1O3dXmnxwCEI1xjrx2EVq9qxyvUbiBzAI26agNq5qLz5VB7dtXEAw7o lcsiNY7pct+TS6CdW4Q3YXIQyn2GCn1UJDYObx/yxn7E8mZUIAmkeP5d7vLdz0L15X xdXcn8UGRp3k9xjG7M8WhJs2+urxKS+eZGVdQwao= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729534AbfK0UoG (ORCPT ); Wed, 27 Nov 2019 15:44:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:52680 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728253AbfK0UoB (ORCPT ); Wed, 27 Nov 2019 15:44:01 -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 C4C2B21783; Wed, 27 Nov 2019 20:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887441; bh=RO3NcGmMVyAPo8SoPW9CsQgCU3aD96mHNIyXuVrwtxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=am2yr1ZbppQiQ3pg7GexT5OPA86pa5IFbYkIrGs5xGXMZ0Wh917X04loM8B+6Rqxk SdfwzchKSObJMYmMlTGbiO05hUtm0vk8p8MIIT9ydBrr/HU1aUc+wZ/6+PkXJpJ/ou 4b1lxktpmed0oLhKXTKf3bYUyXUcVBwG7HgzZ0Ko= 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.9 070/151] linux/bitmap.h: fix type of nbits in bitmap_shift_right() Date: Wed, 27 Nov 2019 21:30:53 +0100 Message-Id: <20191127203034.426095508@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@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 dc56304ac829f..dec03c0dbc214 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -321,7 +321,7 @@ static __always_inline int bitmap_weight(const unsigned long *src, unsigned int } 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