Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp96026imk; Sat, 2 Jul 2022 12:53:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v17Ia9RhospNPMM+3ldjdg9YmOnmtvpOFNOcw+ekqqPSu8bw7rCAX5zhdiasJPbxDPoBtC X-Received: by 2002:a05:6402:e9f:b0:435:644e:4a7d with SMTP id h31-20020a0564020e9f00b00435644e4a7dmr27311830eda.114.1656791602417; Sat, 02 Jul 2022 12:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656791602; cv=none; d=google.com; s=arc-20160816; b=GA4uUOYc+Dc3nFPKreJI7Yl2spviahLH4ZJontN/8nm7PZ6eQ1gUzP0/qcRQdB3D8c spYI/cIETgakXIJkNRjtvaJ4Zdhr/CPt4dC/Ty7rPKWWUFtzbZFwQGVhqPzbYW//Zjxc +ArgjGG2D/U/vWZatReJHENT6VRayUjc5L+qoVCEvKTLmVZW7ayAXUSpcIIrMR9g/GCA dR5jPBWOaf8W6Z5RgOpSqkcV4+/dXyh80XP6qLQ1usVMmjnLcTYNcWAuPMFKHIElUq9m k0olcPWnbaOFWP04wF6S3Zgc7RWEIARzsrY8ol+fx4mj7yC7OqorXcODOT/TIo1YGb4e 6fjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+wWzwqD8IZDR5og5MhYazGbRtFE9YyFS5G8W5TB85JE=; b=v1EvYZTA+NTaQsy28MVlFdQdmmEdkBLSgbQvnyeE+KvlkepvU9nmEg9XPO4MiTq5Qr +iAtR9VDmMbA7sFqPcCKbV8O+8MyDgOfgYb42BSpuEK/o2Fk7tCpKnLL3/M3jcWaETVQ QQIBF56a9gehvIkJc0lG57XJRySqm2UU+21CXONORdBQYyxw0VIAQc4Rx68VBdw9r8PN DMakc6BWhjGk3cE6Z+yjGN8zdLQG8vFjftv0rDloqxuiNJ15AQXkyTapwSmAVueN/50y Mh4AjWB513ZDPWf4X/r2VuOTfd+i4Lw+QNNC4NqH0BQ6fhsnryuWb2HdJTjMtWFM/91L GUPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bLs2IvlR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc42-20020a1709071c2a00b00706b9787b43si5132799ejc.319.2022.07.02.12.52.56; Sat, 02 Jul 2022 12:53:22 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=bLs2IvlR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbiGBTch (ORCPT + 99 others); Sat, 2 Jul 2022 15:32:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiGBTcg (ORCPT ); Sat, 2 Jul 2022 15:32:36 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C88F765A9; Sat, 2 Jul 2022 12:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656790354; x=1688326354; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=leQjJttDswW7L5jBlF9YSCONqNBEeZO/ysMhzGdcPrM=; b=bLs2IvlRE0kDu/mkleVusiww8GHNbnclBxM80OV26qeTigiCliTLYJR7 GPV2+ykwkrqp+NFYtyXmJycNK+TuXwlsAtuQ46E08Inf9+m7PVp6+Lzsk WjO5N+pYmFQt4WBkArYCoeG1geBoBN4XUiHKDuQpUS1LYTsmIEqXzOzrA KW78SljzRR3BzK4ZFJ9+ocH1qukZ9VtQmK7kwrU93kKyQQ8UJ/Azn76a4 SSBuzBaubJpzvCgyuqkwc0rr/Y8J27eyUKZ6eF8DBC91YnBZrgbByXY/T F8AFjSlR++Kqa3TNZQZTXR3l48vIEzgAqkBcXj8hIbACt3QUKRXFlGBDZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10396"; a="308394859" X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="308394859" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 12:32:34 -0700 X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="624624692" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 12:32:30 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1o7iqw-0013qw-2i; Sat, 02 Jul 2022 22:32:26 +0300 Date: Sat, 2 Jul 2022 22:32:26 +0300 From: Andy Shevchenko To: Christophe JAILLET 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 Subject: Re: [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size() Message-ID: References: <3f2ad7fb91948525f6c52e0d36ec223cd3049c88.1656785856.git.christophe.jaillet@wanadoo.fr> <6063ee97-1bbe-2391-78cb-57572851a52c@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6063ee97-1bbe-2391-78cb-57572851a52c@wanadoo.fr> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 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? -- With Best Regards, Andy Shevchenko