Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp96488imk; Sat, 2 Jul 2022 12:54:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vXcuD1q8mqe8UBxuVi7DWW67qjjz8zQC4qXlXjGa0yuxCbvGNW0lME8sNf8l/BiNYGrQcM X-Received: by 2002:a17:907:9812:b0:726:3e5b:d299 with SMTP id ji18-20020a170907981200b007263e5bd299mr21252771ejc.26.1656791655275; Sat, 02 Jul 2022 12:54:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656791655; cv=none; d=google.com; s=arc-20160816; b=BOI4jVv3DyDrSGUpPAUu16PhmkN6QBnznVrObH10wEXUolOz7NnzzYGmMVAD9/LM+o G2dPLelO2Cy1OrJiqaOgYkLSmuU6UdSTMSXoo8XEesoX0aZst+zpj/++mgCwQ7RwiAZh 26P0CkO81DzI5u8tUV2KP2w0jDJdO4nEJ3G3DhOGnenqMeAIBIuGKoHsYKAcH+PvrKdj u2ezRocjyEAJq1FMxVocFoE3JEegpvJDeaZuu93yOCrOZfa4k5mnzOO5TmQ+uFkXlUDk aH8ropGrS0H3qc32sGbFoOKX8VVLFK8RFIfqQAuqfvUUHfoN/mADFEz1VK2Dl0cYbnaj 9TLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:in-reply-to:content-language:cc:user-agent :content-transfer-encoding:mime-version:references:message-id:date :subject:from:to; bh=/08AFn/ad0mBh/4DtHAFsZj6TMfdkZmSlSC70ZCGCNE=; b=a5+KBfSck2osei5P7MUyC43SHm+ipDdvXSr957XwzxIBh+Fb2v8EJXP4O8zlcxr13w AQncgncuEaaRdVn5QFQlNb28gp9rOqVbAQa+4YiCQIaHpVlnwKsi/WWQI5/bR5pn9lu0 gcgRekDTkDdC48NQorqtjo4fmRp4GT8ICziZOZCnbjFPYOWp60XRkY0vicfmKIOHFzO1 2jcy3a0g1qlg4Y1kMEYki+WQl7dsjN5ssgpgG17GCjvdsVDQTU4y+/CrgVdFGYsuYKb8 RQHpJjNelybDzfmDwQ9e+C1EinhZ4xIR0eNapOOh2+PSbbMZKSGwdmHBZaQes97EMlJa 18LQ== 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 gn24-20020a1709070d1800b0070f257ba384si2275253ejc.661.2022.07.02.12.53.50; Sat, 02 Jul 2022 12:54:15 -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 S231951AbiGBTuG (ORCPT + 99 others); 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 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 à 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