From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 135534409 for ; Sat, 2 Jul 2022 19:32:05 +0000 (UTC) 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 Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCF98C43334 for ; Sat, 2 Jul 2022 19:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231559AbiGBTYe (ORCPT ); Sat, 2 Jul 2022 15:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiGBTYd (ORCPT ); Sat, 2 Jul 2022 15:24:33 -0400 Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1824261F for ; Sat, 2 Jul 2022 12:24:32 -0700 (PDT) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1o7ijF-0009O3-LO for kernel-janitors@vger.kernel.org; Sat, 02 Jul 2022 21:24:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: kernel-janitors@vger.kernel.org From: Christophe JAILLET Subject: Re: [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size() Date: Sat, 2 Jul 2022 21:24:24 +0200 Message-ID: <6063ee97-1bbe-2391-78cb-57572851a52c@wanadoo.fr> References: <3f2ad7fb91948525f6c52e0d36ec223cd3049c88.1656785856.git.christophe.jaillet@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-GB In-Reply-To: Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kernel-janitors@vger.kernel.org Message-ID: <20220702192424.BohNPE9Wzq2P8I_WRneWN2GHxfs60U44zlLl2jtDyC8@z> 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 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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A5E2C43334 for ; Wed, 6 Jul 2022 14:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657119158; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cZzJ3hWg6AtmXeNWA+3Z+jhbJnB+rhkZIqRyBJCdPzE=; b=M80ynkCyW+S1H/lr7SP53jq4GPRE9WQFjy8J0EeZKxTxaHQ7rXI8JqGOtY/wYajJLzEZBV 0IWSK9FRI6cR9F8FFsPc4+9SJAqn4ULCCISitbV5Y0shervoE9x7jlbCe9XWTUFy48ZXH/ V+QLj/RfP84rq1P2ynGkywUfg9Gfa5E= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-524-0PMpbhu7M9iJOcQfVeIamA-1; Wed, 06 Jul 2022 10:52:31 -0400 X-MC-Unique: 0PMpbhu7M9iJOcQfVeIamA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B05AA1C18263; Wed, 6 Jul 2022 14:52:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E7A91121315; Wed, 6 Jul 2022 14:52:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6C6F61947063; Wed, 6 Jul 2022 14:52:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5DBED194705A for ; Sat, 2 Jul 2022 19:24:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5115BC28102; Sat, 2 Jul 2022 19:24:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D4BEC28100 for ; Sat, 2 Jul 2022 19:24:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35FCB185A7A4 for ; Sat, 2 Jul 2022 19:24:30 +0000 (UTC) Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id us-mta-163-_BMfB-QaMk2x1IgvfHZSoQ-1; Sat, 02 Jul 2022 15:24:28 -0400 X-MC-Unique: _BMfB-QaMk2x1IgvfHZSoQ-1 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 To: Andy Shevchenko 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: X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mailman-Approved-At: Wed, 06 Jul 2022 14:51:05 +0000 Subject: Re: [dm-devel] [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, kernel-janitors@vger.kernel.org, ntfs3@lists.linux.dev, yury.norov@gmail.com, gor@linux.ibm.com, linux@rasmusvillemoes.dk, hca@linux.ibm.com, snitzer@kernel.org, oberpar@linux.ibm.com, linux-kernel@vger.kernel.org, almaz.alexandrovich@paragon-software.com, dm-devel@redhat.com, svens@linux.ibm.com, vneethv@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, agk@redhat.com Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" TGUgMDIvMDcvMjAyMiDDoCAyMDo1NCwgQW5keSBTaGV2Y2hlbmtvIGEgw6ljcml0wqA6Cj4gT24g U2F0LCBKdWwgMDIsIDIwMjIgYXQgMDg6Mjk6MDlQTSArMDIwMCwgQ2hyaXN0b3BoZSBKQUlMTEVU IHdyb3RlOgo+PiBJbiBvcmRlciB0byBpbnRyb2R1Y2UgYSBiaXRtYXBfc2l6ZSgpIGZ1bmN0aW9u IGluIHRoZSBiaXRtYXAgQVBJLCB3ZSBoYXZlCj4+IHRvIHJlbmFtZSBmdW5jdGlvbnMgd2l0aCBh IHNpbWlsYXIgbmFtZS4KPj4KPj4gQWRkIGEgImlkc2V0XyIgcHJlZml4IGFuZCBjaGFuZ2UgYml0 bWFwX3NpemUoKSBpbnRvIGlkc2V0X2JpdG1hcF9zaXplKCkuCj4+Cj4+IE5vIGZ1bmN0aW9uYWwg Y2hhbmdlLgo+IAo+IC4uLgo+IAo+PiAtCQltZW1zZXQoc2V0LT5iaXRtYXAsIDAsIGJpdG1hcF9z aXplKG51bV9zc2lkLCBudW1faWQpKTsKPj4gKwkJbWVtc2V0KHNldC0+Yml0bWFwLCAwLCBpZHNl dF9iaXRtYXBfc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