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 358712C1B4; Sun, 1 Sep 2024 16:19:30 +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=1725207571; cv=none; b=KkWLDI4/qz4HgWRLaoRNr/9CsypWgxkCb1wOmw3ZpP7Ne7hXnbWc3mLRqqr+w7dSF0RQ70GN7l3BzSpb7Vdsp6i+HG8bFNAOBTZjpkFhM6dt6EENDU7IpbRjktr04pWwcbhqqkJ9Dy1SV2akM1UOsqxgGx/xs2BBlY7EmxzLVh4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725207571; c=relaxed/simple; bh=Uab43FtKXTllZD1UiuQlFVFtbFh6KR3h7rPO1wb++fw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t+1o6OjcBvT/JvB94+/lulKBsVhuc+YkEJEhtEJEnZmCwVOMG7d0S+7Bz+s278F7XGipDrTxvFB9o5hEyrIuwPDaSHGIMxRPS+oAu7xVD+aGm54pkkW0l+1f0WzvBOsxsB7mWkCCMqIjGmiwzTmuP+2VYgfvVG3bVD3rVFPBt4Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LVloD3+s; 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="LVloD3+s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BEA7C4CEC3; Sun, 1 Sep 2024 16:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725207570; bh=Uab43FtKXTllZD1UiuQlFVFtbFh6KR3h7rPO1wb++fw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LVloD3+s7rLjcxn89grTqlTrb/0SVRyMokGWbMwEh1mCTQ40Ic1FrZwoqy2R1jouR MhmjueSzlLltFNnLxxrPvzBsLwTEJ6W0D/kLYOu/pkEYN2ibcp8UF71hDhvBPyoWPk PO3DhAab3lKwwDcYC/Z2goNfQmACQc/ljmqYTrrg= 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 4.19 12/98] s390/cio: rename bitmap_size() -> idset_bitmap_size() Date: Sun, 1 Sep 2024 18:15:42 +0200 Message-ID: <20240901160804.148943893@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901160803.673617007@linuxfoundation.org> References: <20240901160803.673617007@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 4.19-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[0]; }; -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 bitmap_size(size_mul(num_ssid, num_id)); } @@ -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)