Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp736911ybc; Sat, 16 Nov 2019 07:49:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzBE3u46EmzZNA9GyI7Aw3dmLSmCRZ/FiiFxmdk7Sm57H3EEapwRdtteLRdccaxLQX0obij X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr10764836eji.283.1573919370706; Sat, 16 Nov 2019 07:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919370; cv=none; d=google.com; s=arc-20160816; b=iRA3EfRiM/45+vLDVDCyvugGyHjdHzzW+toFflllwsWE7ADg0nik8Jz79WginbvvU4 lbAjqDjkKfIVHNgPA0WJx54sEohi2HhJTvnO6GUOzAvv2JTZOY1eRim5Yo3mkLGt6lyM BsLYH5BvXqo0sfxaAp1zS1hhe7dzVrRCSo1Lkl8ApqS4f7ILVjdo0c6mt4cgA3g/KeUU g1dYd7VmgzVGzBu0ZYkyOFMRYPjWwF9bQyufiURv40Bzm4VxSZqmuQqhqWeom/J8n1in hlxT6PSDAPPQVS2pZBGwxit4vbQAFyZdipefYffgvC4rtQftewRDDr461rpi6PmqJ4ob QyaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r2GSyBsaimieONzaw+LoLkmTqps5LPgmTaozyzWUhAo=; b=F7x+9Y8mDsl7RyWidchQbqRu2ISXIrfx3RcTPwGm90KEvmZP7CrYFz53DkZJhr/B0F E+viEkhu9I9xYL5hdhgckaRM9v3IHdlUbQ+Uwg0TRBhXAdpdmAyHA0uqYXXZmw46AEzX tceq0fShF6KzM0q3XFoim1ObSLy9Izwow/ecMouKqFsi0FVdYzeUQz2ZDaEAtHL5Nxbn 4kMIUsA+z+SgNc5aAbrXRb0hBtBHJRvrNYmDiKxbXR+LTX3kdUl2WsUpHll1Pd52x7mx Sa+koabYVXHpg/0fc8crRYEre0UrkoxbKY1yrp5Wm8H0Djada6luB1J35cmTsm51MyGa xhwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HoGgUA6w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si8020239eju.229.2019.11.16.07.49.06; Sat, 16 Nov 2019 07:49:30 -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=HoGgUA6w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbfKPPo5 (ORCPT + 99 others); Sat, 16 Nov 2019 10:44:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:50056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729086AbfKPPox (ORCPT ); Sat, 16 Nov 2019 10:44:53 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA2152072D; Sat, 16 Nov 2019 15:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919093; bh=dxoXWgxQRR9fmVdKQXfwIFqkFeZZdUdB1tLsIwrsVh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HoGgUA6wAdFUO160oscWND2qlEFY/arvLjF2RIkyvDEXnGVgCqeLPmh7hNUnj3UE2 2In8X81aHT1JxvEJmrrY1ij3EfQvkzacIv4ei+sjxAl3aTGjuyvGzUwEN94tIJoaap yrW22UIR4LryTueyKu48tQiDnwFji5Xs7c0AR9y4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rasmus Villemoes , Yury Norov , Andy Shevchenko , Sudeep Holla , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 4.19 151/237] linux/bitmap.h: fix type of nbits in bitmap_shift_right() Date: Sat, 16 Nov 2019 10:39:46 -0500 Message-Id: <20191116154113.7417-151-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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