Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp87284imk; Sat, 2 Jul 2022 12:35:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vLt7vakZddfAqZ/lUTuXuXQAL7FYGp1aC70efkyJMmv/B4hM6U3YFB7OW6R7TZNwfKB1V1 X-Received: by 2002:aa7:cd66:0:b0:435:74d5:2d58 with SMTP id ca6-20020aa7cd66000000b0043574d52d58mr27667462edb.34.1656790538113; Sat, 02 Jul 2022 12:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656790538; cv=none; d=google.com; s=arc-20160816; b=QyO24295gkhZEysoZ0dXMN/PmtsOPYKmLtqR8oFrCaycuwGuHYzP/XfcgNNMex4kFo G6okmtgHx1ozmjB6sK3NYaXsFHf1USjMKUdoK2ckx/C9b7U3YdhBuI7e+kTKwC6cn+bU ZyjfnwnqotfprEc78Cm5JpUB/iUH4s+bjZSXr9j3Dto5eIXTaLpeQNhJPbhbCi/t5Ewd ldXuPlBt3gKOA3ya2MgjrlEDo8ldOzhZQgtClT3GrMCsK9k3CByc7WWLIQBeu6Sqn7uC +a06Mqd8CeVxKj173e0DlzgJWnQBDY2hHxAgkv8myd9M2K1dy8bsPtBnnsqk1EWjzjpg P/wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:newsgroups:cc:to:content-language:subject:user-agent :mime-version:date:message-id; bh=x9tvUMvnmAcUHEjz3Sx8rwT5n/kiP0zg+yfli7so2qw=; b=Djb+anjRbxQDxO3KN5jGET5wEMO7Q+8CsG9+1/M64EXIWSpWADROB4sK7pN2XbqgM7 UwBkyyQDS4Wls7MReE7aYFOfc975hot9KCTrLUCyI/4lS1qOUi2Pin964GKx3WBGZV09 HIHXOS5tqmVkc58KPKwUAHGD4JigNsb3wBoRNwxujCCPtoAm5WQ1B5xV6S20lvqjDykD HdBwVCtKS0EMERJV3eks+8ymP4ZrTxHXt8XDI8FLs7dBRmVG8bH4UiJ5rdKvAwoHm9bl mOvST1TQRwB1etn40ezLoEsm6CCwiOcIOpv+JOX2WoOjxnqupnM3y5AHC2OtK5KBSexQ 7ClA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs1-20020a056402304100b0042e139a8248si5014008edb.311.2022.07.02.12.34.49; Sat, 02 Jul 2022 12:35:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbiGBTYc (ORCPT + 99 others); Sat, 2 Jul 2022 15:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiGBTYb (ORCPT ); Sat, 2 Jul 2022 15:24:31 -0400 Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E455D261F for ; Sat, 2 Jul 2022 12:24:28 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id 7ijBoXUXwOXCy7ijBodMg5; Sat, 02 Jul 2022 21:24:27 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 02 Jul 2022 21:24:27 +0200 X-ME-IP: 90.11.190.129 Message-ID: <6063ee97-1bbe-2391-78cb-57572851a52c@wanadoo.fr> Date: Sat, 2 Jul 2022 21:24:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size() Content-Language: en-GB To: Andy Shevchenko Cc: agk@redhat.com, snitzer@kernel.org, dm-devel@redhat.com, vneethv@linux.ibm.com, oberpar@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, almaz.alexandrovich@paragon-software.com, yury.norov@gmail.com, linux@rasmusvillemoes.dk, linux-s390@vger.kernel.org, ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Newsgroups: gmane.linux.kernel.janitors,gmane.linux.kernel.device-mapper.devel,gmane.linux.kernel References: <3f2ad7fb91948525f6c52e0d36ec223cd3049c88.1656785856.git.christophe.jaillet@wanadoo.fr> From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 02/07/2022 à 20:54, Andy Shevchenko a écrit : > On Sat, Jul 02, 2022 at 08:29:09PM +0200, Christophe JAILLET wrote: >> In order to introduce a bitmap_size() function in the bitmap API, we have >> to rename functions with a similar name. >> >> Add a "idset_" prefix and change bitmap_size() into idset_bitmap_size(). >> >> No functional change. > > ... > >> - memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); >> + memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id)); > > Why not to use bitmap_zero()? > > ... > >> - 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)); > > Why not to use bitmap_fill() ? > > Hi, For this initial step, I wanted to keep changes as minimal as possible (i.e just function renaming) In fact, I plan to send a follow-up patch on this file. This would remove the newly renamed idset_bitmap_size() function, use the bitmap API directly (as you pointed-out) with "set->num_ssid * set->num_id" as size. It is already done this way in idset_is_empty(), so it would be more consistent. If the serie needs a v2 (or if required), I can add an additional 5th patch for it. Otherwise it will send separatly later. CJ