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 D7C5CC433EF for ; Sat, 2 Jul 2022 19:42:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231319AbiGBTmK (ORCPT ); Sat, 2 Jul 2022 15:42:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiGBTmJ (ORCPT ); Sat, 2 Jul 2022 15:42:09 -0400 Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr [80.12.242.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB1D9BF54 for ; Sat, 2 Jul 2022 12:42:07 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id 7j0Fovq0J26JC7j0Fox7ym; Sat, 02 Jul 2022 21:42:06 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 02 Jul 2022 21:42:06 +0200 X-ME-IP: 90.11.190.129 Message-ID: <62d3cfcd-a32e-59d1-c376-c95e8da1049f@wanadoo.fr> Date: Sat, 2 Jul 2022 21:42:02 +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-US 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> <6063ee97-1bbe-2391-78cb-57572851a52c@wanadoo.fr> From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 02/07/2022 à 21:32, Andy Shevchenko a écrit : > On Sat, Jul 02, 2022 at 09:24:24PM +0200, Christophe JAILLET wrote: >> Le 02/07/2022 à 20:54, Andy Shevchenko a écrit : >>> On Sat, Jul 02, 2022 at 08:29:09PM +0200, Christophe JAILLET wrote: > > ... > >>>> - 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() ? > >> 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. > > If you use bitmap APIs as I suggested above as the first patch, the rest will > have less unneeded churn, no? > > Makes sense. I'll wait for some other potential comments 1 day or 2 and send a v2 with the simplification you propose as an initial step. Thanks for your feed-back. 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 83475C43334 for ; Sat, 2 Jul 2022 19:50:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231991AbiGBTuG (ORCPT ); Sat, 2 Jul 2022 15:50:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiGBTuE (ORCPT ); Sat, 2 Jul 2022 15:50:04 -0400 Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6492B86E for ; Sat, 2 Jul 2022 12:50:03 -0700 (PDT) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1o7j7y-0008Us-Dh for linux-kernel@vger.kernel.org; Sat, 02 Jul 2022 21:50:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@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:42:02 +0200 Message-ID: <62d3cfcd-a32e-59d1-c376-c95e8da1049f@wanadoo.fr> References: <3f2ad7fb91948525f6c52e0d36ec223cd3049c88.1656785856.git.christophe.jaillet@wanadoo.fr> <6063ee97-1bbe-2391-78cb-57572851a52c@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 Cc: kernel-janitors@vger.kernel.org, dm-devel@redhat.com Content-Language: en-US In-Reply-To: Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Message-ID: <20220702194202.qzqVSH3FTx2SAGCliHsG6gK_C0W1WvqQthPjzZ4RAVs@z> Le 02/07/2022 à 21:32, Andy Shevchenko a écrit : > On Sat, Jul 02, 2022 at 09:24:24PM +0200, Christophe JAILLET wrote: >> Le 02/07/2022 à 20:54, Andy Shevchenko a écrit : >>> On Sat, Jul 02, 2022 at 08:29:09PM +0200, Christophe JAILLET wrote: > > ... > >>>> - 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() ? > >> 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. > > If you use bitmap APIs as I suggested above as the first patch, the rest will > have less unneeded churn, no? > > Makes sense. I'll wait for some other potential comments 1 day or 2 and send a v2 with the simplification you propose as an initial step. Thanks for your feed-back. CJ