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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 99ADCC4332F for ; Thu, 14 Dec 2023 19:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A7xoQGPWv9lLksCHhbdwTgBYykquIt1OQT9ftANPKc0=; b=BHKLqbSpHFkyro QkSvA/aJgK2r4LAsqRoZMa31pGcRBZLQeeBhZZDEKkCPJxms0ZTSPtGqnU+NFL5wLImv5OH2j76jh OfKvmAia0ODGZYGLauLm9SFdm0i5/J+u/IPweAk2X56fhqPqZKA0e3lsYfMaU2ElOyEPdwDacNMP3 pmSzIMFeMcUH0gdVOVM9ugHjqGfVGgvBmAvDGt6qWvfDHQvE4KvY//WT6LqbYJDgsFSEutPumZDud Pqq5LUKJyh3oIpiYB5etmv8Y/pNy9X/sB4SRecm1gu/pDi2G1O2OJAAG91ONlFM/+7BmK915XLkJM WJ0jml463G0FPU4m4DwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDrhb-001A7W-0K; Thu, 14 Dec 2023 19:48:59 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDrhY-001A6g-2X for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2023 19:48:58 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-5e309941f46so18175257b3.3 for ; Thu, 14 Dec 2023 11:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702583333; x=1703188133; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=etA6k5Cw7mdYtsEDYoQF51pReZIpMv//ZV8ayVcLvW8=; b=N/8HKVbcjwmt2/dLCUf3CpVGuh1jzmcYYDtSj7TGYgCk+0JsguD4pq2QRa4Pf6RMUG gtFsLXya5dj9AodyPFnytxjX7PmUWRSwTxQ9DyvcNA4PeFijlhJ3De+CVYZxC2/B9Ke6 2MbIW1TRSIyqbKQETxNNjx+k9XMp7wm7d4NVfKSq1RdY3Zawmx/oycmpM7uuItLd1c0s hNO4i8XsUfAyXpUJ4tHSAlidOk4065Lmk7jrXV5UHnnF8nRRQcqT+WcEohYPMBUY22qi z0o+tzUEzHB0IwsttDtAXEdyAhcQOoIZ4wqRGTjwLgMgBrRGMT/YL1dfvrCmL8AQCwgg ElbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702583333; x=1703188133; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=etA6k5Cw7mdYtsEDYoQF51pReZIpMv//ZV8ayVcLvW8=; b=rChV6DpXke/mGfes1m+KYZjUMkWkm0qvQlHla77eV/zNwtuQ9+IGaB8q0i75Bm4W4a nF/jYBJl2wYfiA8I7rhPajSZlFXeTYtbd8do8+kBmYAIec2IOcCNxv+qo5Koqyopz20P 6eZJ7n0CcAtqi9sW6puklp9UFAyLtsv3/DoCSnnfLwX6Lq/WK/jb55S59g8zz+cfZY4I HAZ/Tu3p2OYCZ5pzHpkpPdDWr8ohnnyBZs5ii34ENXVhb5RWAX+oPstq5aAZo3a+bX7J /KqgZiwBtHh/1pf5CREA3MS1KcBl7lXhP6J+PvQddMOyZAwRfq94ckQDU40DlxrYY7YX jvVA== X-Gm-Message-State: AOJu0Yzc8gOrgODSCz58yLQtxv0hO/c7SbZHWNIVhjojU5SsILUTmKpv uA2q+fLM0u0WwgAnw9WlJyY= X-Google-Smtp-Source: AGHT+IHVLAhACMbrlwpppVWXwJ6uwwTzJ+evBj75hBh8yuPb56O4N964Nsu2KP/fttA7+wSTqzi6Tw== X-Received: by 2002:a81:54c1:0:b0:5d7:1940:53bd with SMTP id i184-20020a8154c1000000b005d7194053bdmr8905236ywb.53.1702583331856; Thu, 14 Dec 2023 11:48:51 -0800 (PST) Received: from localhost ([2601:344:8301:57f0:e177:373d:4717:ff6c]) by smtp.gmail.com with ESMTPSA id c2-20020a81df02000000b005ca99793930sm5609088ywn.20.2023.12.14.11.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 11:48:51 -0800 (PST) Date: Thu, 14 Dec 2023 11:48:50 -0800 From: Yury Norov To: Alexander Potapenko Cc: catalin.marinas@arm.com, will@kernel.org, pcc@google.com, andreyknvl@gmail.com, andriy.shevchenko@linux.intel.com, aleksander.lobakin@intel.com, linux@rasmusvillemoes.dk, 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-mte 1/7] lib/bitmap: add bitmap_{read,write}() Message-ID: References: <20231214110639.2294687-1-glider@google.com> <20231214110639.2294687-2-glider@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231214110639.2294687-2-glider@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231214_114856_824630_99A44C2E X-CRM114-Status: GOOD ( 13.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 14, 2023 at 12:06:33PM +0100, Alexander Potapenko 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. > > Cc: Arnd Bergmann > Signed-off-by: Syed Nayyar Waris > Signed-off-by: William Breathitt Gray > Link: https://lore.kernel.org/lkml/fe12eedf3666f4af5138de0e70b67a07c7f40338.1592224129.git.syednwaris@gmail.com/ > Suggested-by: Yury Norov > Co-developed-by: Alexander Potapenko > Signed-off-by: Alexander Potapenko > Reviewed-by: Andy Shevchenko Acked-by: Yury Norov _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel