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=unavailable 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 64F1CC432C0 for ; Wed, 27 Nov 2019 21:02:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3270C21569 for ; Wed, 27 Nov 2019 21:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888530; bh=dxoXWgxQRR9fmVdKQXfwIFqkFeZZdUdB1tLsIwrsVh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fY1zTVbU6Rp9ZGuXbN0KPM1f5dBBhgr1tiR14TI+AfIvYvaRM4lJJWTHR0ZQwlV8F lvGjytnDszPS4d/Hm+QYG2yJ7DbxO2RRv1s9+3VhvXc2OjJam+P7y4zB8u0Ng443FU BLRZMO894QhcYhrfMtQNupMiiYmBc3G4Bz5vBh7E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731838AbfK0VCI (ORCPT ); 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