Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp701769rdh; Thu, 26 Oct 2023 13:14:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnf1qjbadG4ewbn8pIA9q/4eDxEhcSOxiYuF8oPLZUPHgITnJM5T1LgKYCkw+Ftd+DDFRD X-Received: by 2002:a81:c946:0:b0:5a7:b464:ff1a with SMTP id c6-20020a81c946000000b005a7b464ff1amr597735ywl.6.1698351286291; Thu, 26 Oct 2023 13:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698351286; cv=none; d=google.com; s=arc-20160816; b=ER5Q9uPTR3Jam3qP+6WZcKyCWLmj/0Z6nfnuqQfIlw9i2LcAQ5PE3YDzmriZGtduxX 3fWDFMLuAH701otOq7X1LZLd+K1+iefrCod5zUuseCx0s1/eXt+k5oH1qu9d8Fj+y/zl Bjp3LbCkyjY+5XpdNQF5BMtgD66m80XM3rPqzksA/oa5FTFhCF4rzLoZ5A1sTUD5Zscf v/Tn5CqsZtF4FZ4VlDgNnFrI/pSkHLCv3TFdjGnS2vBGhRbi/52zk1VMjHMKG0pct4z5 ednvcuSK9Obfd5+NbjMQCYgQ/0lWnfPq9EaB7zCFzWHzMpI1CdOlCyBVxbv0uHGR9+tX 18kA== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jjsFh8tGk0O3SmBDyq7AaJYsoa2IeA1FAYqnbn7bbyI=; fh=QEGGfnzgLB1PJNzeZDNHIJJxryNQqqD8yjdtP5TLpzQ=; b=L21C0f2ZBXlrMoIIv0TxSarFuLo3sIZy1zDfH56KuqC56bhAD4F6YfxLXdb4CFhzCF IFMNrjAOenobBuB8PgypelrRHPorAGL1dYJCL/uF4OzAMcAKglAUztukhKk8kyE5kHD3 WY0bzhYOsB07pRQhwnnIKEJHUvzbnImfTqheSE44c1A2X8hNZCSqnpLy7Ed7wSCyWVXS qSYod3nPwkNt37fVRoTLE0hmKkXlZUxim0HWVpiaiajGImEAeLyHP0+8Mk9mkwrZcPx5 GqzN78VqpskhYF1o7maH3tglcJrihiloaoyighnp/2hLHCHG1oF3exnO/fMI/+dh+GQ0 s4Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EnoFok3e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f129-20020a0dc387000000b005a7aef2e19dsi95614ywd.156.2023.10.26.13.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 13:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EnoFok3e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9CB6F824E7AC; Thu, 26 Oct 2023 13:14:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344732AbjJZUOh (ORCPT + 99 others); Thu, 26 Oct 2023 16:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231546AbjJZUOf (ORCPT ); Thu, 26 Oct 2023 16:14:35 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D842E129 for ; Thu, 26 Oct 2023 13:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698351274; x=1729887274; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BbSlSDPQtBqXoyAjsGOiZ+4E4cSGC6fmCboPLYplzk4=; b=EnoFok3eR4zzc3RVSATgyh+VXQXG6O/6CkkJJd6gV+OlVoILlRVJlCoo +S9Q5jkZTHs4c3OiH3Z2CFLw2uSzxUl5/gibVT1R/ncJerbURWtyXcCrq SNwWdPHPCqoDlqqxfVObeLdIVmHm+DyEDKT0RcNCeBjwBcNVaVk5lFypl CEMTgl3HJWBQMrSapleqBpoi2myHyn8u4STZ1esgrOvxpPsE3VEO/UjdR qg5LyyUW7Psd7tmEvFaxYAvnTfNCcNfehwSNR/82qCYRfLOPKwrTflequ HN0kRwJBeM/fF9war2Zzt2mvKb10Yz0sqPreIFGvTmSmYP5kk0aELyKcI A==; X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="9183726" X-IronPort-AV: E=Sophos;i="6.03,254,1694761200"; d="scan'208";a="9183726" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 13:14:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="709195251" X-IronPort-AV: E=Sophos;i="6.03,254,1694761200"; d="scan'208";a="709195251" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 13:14:28 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC3) (envelope-from ) id 1qw6kL-00000008x65-1rXc; Thu, 26 Oct 2023 23:14:25 +0300 Date: Thu, 26 Oct 2023 23:14:25 +0300 From: Andy Shevchenko To: Alexander Potapenko Cc: catalin.marinas@arm.com, will@kernel.org, pcc@google.com, andreyknvl@gmail.com, aleksander.lobakin@intel.com, linux@rasmusvillemoes.dk, yury.norov@gmail.com, alexandru.elisei@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, eugenis@google.com, syednwaris@gmail.com, william.gray@linaro.org, Arnd Bergmann Subject: Re: [PATCH v10 1/2] lib/bitmap: add bitmap_{read,write}() Message-ID: References: <20231026135912.1214302-1-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 13:14:43 -0700 (PDT) On Thu, Oct 26, 2023 at 04:48:46PM +0200, Alexander Potapenko wrote: ... > > > +static inline void bitmap_write(unsigned long *map, > > > + unsigned long value, > > > + unsigned long start, unsigned long nbits) > > > > While noticing strange indentation (you have space for the parameter on > > the previous line, > > I believe I do not, maybe that's something on your side? > There are tabs in the source, and in the original email. I meant that you can use 2 lines instead of 3: static inline void bitmap_write(unsigned long *map, unsigned long value, unsigned long start, unsigned long nbits) > > I realized that this is a counter-intuitive interface. > > Can you actually make value the last parameter? > > It is consistent with bitmap_set_value8(map, value, start), and in all > the functions above @nbits is the last parameter. Oh, then I leave this to Yury. -- With Best Regards, Andy Shevchenko