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 E7CAFC432C0 for ; Wed, 27 Nov 2019 20:50:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B548E21882 for ; Wed, 27 Nov 2019 20:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887825; bh=BZ47EP3bX73SeH4D91epy1Eo8HBrWZQvtoUKao3oJ0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=q+KXKO3YgAH9sO9wneXSsLCby7eXFEAmW0fwpiwnaiY1B15ZX/3JHZdm2iO20NyCn OpL2tH6IsX+Mugm0wGPHnnddN42Z1thOX2oOgrsIgINUVLM0D+BZFpIAVSITZ+RhzI Z24AdHph261rkGy+TlHAFcQ5c7dod/htPl0abX3w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730353AbfK0UuZ (ORCPT ); Wed, 27 Nov 2019 15:50:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:36244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729654AbfK0UuV (ORCPT ); Wed, 27 Nov 2019 15:50:21 -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 607E62186D; Wed, 27 Nov 2019 20:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887820; bh=BZ47EP3bX73SeH4D91epy1Eo8HBrWZQvtoUKao3oJ0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2vLZhAePDnODCpKHH4Uv5M0BF2E2a4CJnP6ZIPuo59asIsg17arjRubxKbv62/vnz q/ZYUFNrl9L1NVbht+kkqIrv30CToOZzhOC79wBYz1yTpUxYyN+Q1fJQXNOiA304E1 eAlSFGOZcK4CiSFoefVk0Y1RJYhCv08yJn9TW2zc= 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.14 108/211] linux/bitmap.h: fix type of nbits in bitmap_shift_right() Date: Wed, 27 Nov 2019 21:30:41 +0100 Message-Id: <20191127203104.229744123@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@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 1990b88bd0ab2..aec255fb62aad 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -355,7 +355,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