From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55AEA1C578B; Tue, 27 Aug 2024 14:42:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769756; cv=none; b=MBY5NX/xZjywq3j5dy8GdNdNmRaymgRh0jWgIunMao/CVZwyx33ApaxqguR43qp2fIbvPUpGgZnX5v4zTi9frmfNlbUI3U1QBqlUGBLMx9sUpuHdYhrhQd+P9yYVOV7RQdsY0+i8UTl2bsgxVF0pmEF/EaL/0d5GPxp7i7fvxRA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769756; c=relaxed/simple; bh=4rAzFYWb2LjN+ZZuNfCBAhvCrhCnMEDYOh7fo0rmwt8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tosq/2oJSTCmQsdXMUfbJZm0J+FrsCgXiD0aOjHTNGxa3nrgSrZ6TKOrg43LLQEH1UVOzB7iUkLhonXa8iZO7BPYdcRUxZXen6ckf6CoU5tUZo3ZLj24c/CYMxSfhFW0AtuehNzzksGtppDgMJTdqXAtyL2U2uuzZn0ZYFrDOOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tiX4zV9l; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tiX4zV9l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D22E4C61043; Tue, 27 Aug 2024 14:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724769756; bh=4rAzFYWb2LjN+ZZuNfCBAhvCrhCnMEDYOh7fo0rmwt8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tiX4zV9loPjZSTdCi6NrXDq6IimSwj3D8wtlqY564PZ7YsLWsOWTY/JYMOYZ8y3fr xsxAU08WZgn4Dz33aWccHnbDZW8vJQHRc0wuNBJlScxGOpxRdhzJd0EgO9NKWwQb6k HjFhwhU47X5aX45C1k5V4TMq46X65c7WciIWB4qw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Przemek Kitszel , Peter Oberparleiter , Alexander Lobakin , "David S. Miller" Subject: [PATCH 6.6 027/341] s390/cio: rename bitmap_size() -> idset_bitmap_size() Date: Tue, 27 Aug 2024 16:34:18 +0200 Message-ID: <20240827143844.442523160@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827143843.399359062@linuxfoundation.org> References: <20240827143843.399359062@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexander Lobakin commit c1023f5634b9bfcbfff0dc200245309e3cde9b54 upstream. bitmap_size() is a pretty generic name and one may want to use it for a generic bitmap API function. At the same time, its logic is not "generic", i.e. it's not just `nbits -> size of bitmap in bytes` converter as it would be expected from its name. Add the prefix 'idset_' used throughout the file where the function resides. Reviewed-by: Przemek Kitszel Acked-by: Peter Oberparleiter Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/s390/cio/idset.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/drivers/s390/cio/idset.c +++ b/drivers/s390/cio/idset.c @@ -16,7 +16,7 @@ struct idset { unsigned long bitmap[]; }; -static inline unsigned long bitmap_size(int num_ssid, int num_id) +static inline unsigned long idset_bitmap_size(int num_ssid, int num_id) { return BITS_TO_LONGS(num_ssid * num_id) * sizeof(unsigned long); } @@ -25,11 +25,12 @@ static struct idset *idset_new(int num_s { struct idset *set; - set = vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id)); + set = vmalloc(sizeof(struct idset) + + idset_bitmap_size(num_ssid, num_id)); if (set) { set->num_ssid = num_ssid; set->num_id = num_id; - memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); + memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id)); } return set; } @@ -41,7 +42,8 @@ void idset_free(struct idset *set) void idset_fill(struct idset *set) { - memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id)); + memset(set->bitmap, 0xff, + idset_bitmap_size(set->num_ssid, set->num_id)); } static inline void idset_add(struct idset *set, int ssid, int id)