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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BD3FFC4828D for ; Thu, 1 Feb 2024 13:24:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 54F814044C; Thu, 1 Feb 2024 13:24:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 54F814044C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1706793841; bh=XuJgHFQS6aWaNcA1flW4h2V6VHVKbCfJg9vcYDiFWZI=; h=In-Reply-To:References:Date:From:To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=hi1AzY/wV/rYjZHfRztS2DSjOCKZieuc/nG52PVnRKpFL+83slStw14jYjAxMA5RX D0sDx2Z1cGE3QsGQ5tOslXs6+pPDjgiCfbP6WpdKP2xOAsm4ENukRDjSIjD26NSuI9 dZm2W1YDM1f/gUeIhhTylO7sBRZMdtEKsFI90/C5qqGAM5gfdpM1C0RzEEH2vs3t53 UymM5q1UMaK45l5viR1cZPxgXKu1izS1nJRGjNqWLelXksr7xE1Q3c+LuZpEWxvUEu uloKGMp+mTzUtbK6d88KB0NLbyPXWcWFVA/AaoDBRnMdHN21SlTCwaYn33+B0VnQzx gyzX0mzQ9+FPQ== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7DNv_67Syazp; Thu, 1 Feb 2024 13:24:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 179F04011D; Thu, 1 Feb 2024 13:24:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 179F04011D Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3F3A21BF396 for ; Thu, 1 Feb 2024 13:23:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EB50D83AC1 for ; Thu, 1 Feb 2024 13:23:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org EB50D83AC1 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O2D76hHEb5aF for ; Thu, 1 Feb 2024 13:23:56 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1488B83A87 for ; Thu, 1 Feb 2024 13:23:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1488B83A87 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 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 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" Content-Type: text/plain X-Mailman-Original-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== X-Mailman-Original-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-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=arndb.de header.i=@arndb.de header.a=rsa-sha256 header.s=fm2 header.b=ouo6nnHE; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=KQ/R0jSV Subject: Re: [Intel-wired-lan] [PATCH net-next v5 01/21] lib/bitmap: add bitmap_{read, write}() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , linux-s390@vger.kernel.org, Andy Shevchenko , Wojciech Drewek , Yury Norov , Ido Schimmel , William Breathitt Gray , Rasmus Villemoes , linux-kernel@vger.kernel.org, dm-devel@redhat.com, Marcin Szycik , Alexander Potapenko , Simon Horman , Przemek Kitszel , Michal Swiatkowski , Netdev , ntfs3@lists.linux.dev, Syed Nayyar Waris , Jiri Pirko , linux-btrfs@vger.kernel.org, "intel-wired-lan@lists.osuosl.org" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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