Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp165699rdb; Thu, 1 Feb 2024 05:24:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmKBCDHgk8GDbMWXP0kIR9sNGRK0BMwal2RAaDGK6CndhYy7qfjxRkqOYlA/m1MAtm+NGT X-Received: by 2002:a17:906:e4a:b0:a35:e1f7:d050 with SMTP id q10-20020a1709060e4a00b00a35e1f7d050mr4129799eji.37.1706793861382; Thu, 01 Feb 2024 05:24:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706793861; cv=pass; d=google.com; s=arc-20160816; b=o+CiFx+5JmC3q9tf7EtX78rjmY3J45mISnaGtYKFQmO38A+Jge5HXeib3uqW6xFNnm zh51ImLOyF7lUfj/yoQBID7mmQr+k3gFUnhP+QAg3hDjFcjAVheRDc2AgIvjJ6xhYsp3 uI+dD7i8DedQOw07g0lRQ98acM+icvwmz6WvmhlT6/LhjPFHc/Hfp68JkbEtYSn6Rm4p Sxnp+OjacuqKSYiIwt2WNG5Gt1mKs5/AZyXU9hGswZ/CC5+vtf3thAo5lmtG5LTj05rx WQfWqTNxgDXzAN4jKwWXBbYp/+gAwVi/Fjn/ie/tDNXxrPo8lQeX7fBWo+75B9hHojeP NohQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=XuJgHFQS6aWaNcA1flW4h2V6VHVKbCfJg9vcYDiFWZI=; fh=RH3cUy+UxZMScFHYbHY1Auij1SNsOJja86pcCnuc484=; b=QrcGdsIng8XyAZu5Ey0B5B4IYO5E5n7XvDQuGX3NYeUSZHmp/LvVEfjIwb7F4tlUtY aQNb+Yp8JE18UEGzhSPEXyWVqvfnUAeOFPp5OUvl/Ssac3dQ1KSBiKcDgxtR9aKHPpBu stJbB04tXw9G4lo5F+R1nsFSGBL0U7n5n7nD0M3hpYUAOSjiLo3l63ULOFl/EI1vkSb2 P4xL7QU7e6lyRkzsQp3JB4IOXWQT285XC+HLuRsbzOQBeY2LJXcFWBqq+mNZvhjNV5Lu m/YQwuAybjJ1h/8NrtqXsB9oercg+jACvGJxaVozBJf+oLcNZWz29v4rBcMmDsYdCEJr UZUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=ouo6nnHE; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="KQ/R0jSV"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-48228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de X-Forwarded-Encrypted: i=1; AJvYcCUAngNuM2iSC4h4gVr2gJKgp/e5BaPK/cP3Z9KrFd5mPJFrqQarb1i8NUnKf8/yv2Mpt0K/r2UeqqhseJj1+Y6IuKEGdIChAa6SLiQDEg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y9-20020a1709063a8900b00a3599b5c353si4288020ejd.260.2024.02.01.05.24.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 05:24:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=ouo6nnHE; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="KQ/R0jSV"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-48228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48228-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F13001F23B27 for ; Thu, 1 Feb 2024 13:24:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C70BA5CDC5; Thu, 1 Feb 2024 13:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="ouo6nnHE"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KQ/R0jSV" Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C4E5336A; Thu, 1 Feb 2024 13:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.27 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706793837; cv=none; b=oEPMjkpsED9b7n8YKVXs8hg9s15xGf0uFtCMY7Jp+TAu8f9mzlomvy41UgqdERTeVRfWt5dGbh7V9zs3HeGk4QQVsAZyYEp3khDdhsJnEkGKAt1ejLTs9Iv1b2MBIz3iLwTAMRJuG7RKSls+7PUe36oymff9BneT3cnO+V/vWPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706793837; c=relaxed/simple; bh=i3O7cEFRCRp3NV/JR3K5Es7KwxtLcyjexe/DSFkKE/I=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=O8bltsLQZqE+dZmvrD3uHdHslHhfzYgFldUd1Ze5gXraG7iE45RJfzOQbZUpK53QqAZeTnHqO3upbElWKSiANKBaDE7ydZpcklSyEJVgAuRwwTcQ8tEKqKRATo0HnE2kIux1I8A21IUsrWNsHeh4gizE13oamdP8eeybzCfJjUQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=ouo6nnHE; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KQ/R0jSV; arc=none smtp.client-ip=66.111.4.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 956B05C01C4; Thu, 1 Feb 2024 08:23:54 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Thu, 01 Feb 2024 08:23:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1706793834; x=1706880234; bh=XuJgHFQS6a WaNcA1flW4h2V6VHVKbCfJg9vcYDiFWZI=; b=ouo6nnHEiDCY3TlC0TfL0s7DMA 5ACdf31FhVUJJRdCFILqqHY0IDqmd+h1MJcqEkP7byBoyTP3jm0uS7E5KYnGx7WV SB0uySCqflqbPrUy47WQ3l99edUCG7NPPqCgc2Yh2RxQodHJOx8OiY+zjiAeyYyQ fkJSn1cliU+X0fzOzEi07Rr/AQglKlh08byavYNEJnxUp09G7ZwYv2vrxZlaQu6C u6MPDcjzmb3Ru6/YzGYvROfj9aboqfaRVTu1on3vL5pdAWu34J+zrh1juc6LOV6+ nHU+4AiuNgVBZ1ajD+cMD2wRKCN5b79yumNLCucDCpdZo/hab7HCO1Q3hKRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706793834; x=1706880234; bh=XuJgHFQS6aWaNcA1flW4h2V6VHVK bCfJg9vcYDiFWZI=; b=KQ/R0jSVqSOV8Fkh55Ix7fr3moctr7qhpbtuufmtlfbo cGQHx5nS+ZswlCHktEzY5YwoseyMx4WVIn2Iqpq0py1HBvaJ6soJMWGmvd7sYULm //wGTiPbNQPHQZ9UwTfDpw5CTkKCZwJrGZHNHDvYL+6k3jg4gq3SVtQHTdQ1qKLN Kqq0arvRr5JGVAlufR0FzACbHPdixNaO25zNbeoxh2SSB3iv8UZ+PAewDQO5JQXR HyLhBc7HL+j2mgsJWYtu0TSj0dXlDZy1s7yZwU5mx0hv1aAznj606JDmZQQg2p6f D+54BgNtJgupHsYt8t5uEozqJpE880nNq5jb0bIq4g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeduuddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0184AB60089; Thu, 1 Feb 2024 08:23:53 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <3f6df876-4b25-4dc8-bbac-ce678c428d86@app.fastmail.com> In-Reply-To: <20240201122216.2634007-2-aleksander.lobakin@intel.com> References: <20240201122216.2634007-1-aleksander.lobakin@intel.com> <20240201122216.2634007-2-aleksander.lobakin@intel.com> Date: Thu, 01 Feb 2024 14:23:33 +0100 From: "Arnd Bergmann" To: "Alexander Lobakin" , "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" Cc: "Michal Swiatkowski" , "Marcin Szycik" , "Wojciech Drewek" , "Yury Norov" , "Andy Shevchenko" , "Rasmus Villemoes" , "Alexander Potapenko" , "Jiri Pirko" , "Ido Schimmel" , "Przemek Kitszel" , "Simon Horman" , linux-btrfs@vger.kernel.org, dm-devel@redhat.com, ntfs3@lists.linux.dev, linux-s390@vger.kernel.org, "intel-wired-lan@lists.osuosl.org" , Netdev , linux-kernel@vger.kernel.org, "Syed Nayyar Waris" , "William Breathitt Gray" , "Andy Shevchenko" Subject: Re: [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read,write}() Content-Type: text/plain On Thu, Feb 1, 2024, at 13:21, Alexander Lobakin wrote: > From: Syed Nayyar Waris > > The two new functions allow reading/writing values of length up to > BITS_PER_LONG bits at arbitrary position in the bitmap. > > The code was taken from "bitops: Introduce the for_each_set_clump macro" > by Syed Nayyar Waris with a number of changes and simplifications: > - instead of using roundup(), which adds an unnecessary dependency > on , we calculate space as BITS_PER_LONG-offset; > - indentation is reduced by not using else-clauses (suggested by > checkpatch for bitmap_get_value()); > - bitmap_get_value()/bitmap_set_value() are renamed to bitmap_read() > and bitmap_write(); > - some redundant computations are omitted. These functions feel like they should not be inline but are better off in lib/bitmap.c given their length. As far as I can tell, the header ends up being included indirectly almost everywhere, so just parsing these functions likey adds not just dependencies but also compile time. Arnd