Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1444277ybp; Wed, 9 Oct 2019 14:19:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTGEPMlSxc+tLdMrTYxuFhfrkgzdnvLe3kDT+FYcMKe9srKvam/dCLZy5UCHj7BMPqFDVJ X-Received: by 2002:a17:906:4a95:: with SMTP id x21mr5001273eju.18.1570655966995; Wed, 09 Oct 2019 14:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570655966; cv=none; d=google.com; s=arc-20160816; b=eZD3ob0wVwR0UUjWhgp4DmylSg+v6LVaZO9PyZydpmN4+U3gRV6SC0tv1Q6AS3gj62 ddS7Ygw/WVLHFeLC6T5P4J0rsgW3mtX/d8rCTXTvHhtlMXPZZBvcS0FseD0Q7zz/Ga6S J8yXNt0F8KUCGJ8wWERsITqfZ3D47ev2baTEOViu1D2DaQbpALkah7Yruv9rkC9sjvIH K6sHwbE1PKBjxfPxhryhFOv5YmpZxgNQQ9bBnOzBq6aZI473tJSykJBbQH2V1NY4orBu 7rvcgo5pMf57Zh0XB0eNIU8BMUhrROF/a8ztqv3MQ0vux+NItApXbRlBPqrwsoE3CZFG xTSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=gFVi6KCmtvNLLHpJSfSryLM7+3XACM+cRwfjWoAXY/0=; b=Ad4UeDbxyafYRpGQD/IYse3ZtYgc95tNQ7gRN/RZu3ONQM8bFbbNH4uBLBVz0h8CW6 bRJZGdbFOGOB+Zn4edpVHTF/DfIu5LB3rLdRQOZA5e8kjtTMkC6pJPYxhokFJLLhrOXp cp10U/2Atmc8YDAp/yWhmvcRJig+x/TWsGgLXm/bJr+MQP9wv7kJsX2RShQEZ+ASYTP0 A0sHmtT5GX6zOdJ9o6+Sw9yb3PCHjjOVhdk4XoJ8G3lnfn5mKgZbZa1SFUvweQXGkGVE NdVizIah+HKmP4c7Zxx2hy1E7eKLVqlPhPm0av63pXZ1sYJg9VQTtI6RXqttS1T7xVy2 QYKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CJOqXT1X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si2201860edb.262.2019.10.09.14.19.02; Wed, 09 Oct 2019 14:19:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CJOqXT1X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731616AbfJIVS7 (ORCPT + 99 others); Wed, 9 Oct 2019 17:18:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:42472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729535AbfJIVS6 (ORCPT ); Wed, 9 Oct 2019 17:18:58 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C7C420B7C; Wed, 9 Oct 2019 21:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570655936; bh=J/UoD8TI8r2PBv1hXoDAUnvePVV2cHTJo4SSSOlvQS8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CJOqXT1XwlBfVttI7DYPGvW2Jevkihy44Tves3loSgg+2No5LLHJwR5E2VQLHHex7 ayk23kjS13Kei0/AcZ6eZn/SKW03QpiTYpeZtE1NPQ4lSiYLuWei96qaa2o4pq9AD7 vzOEBBXiawhBVDCShGgzDBq1ExUBLHM5C8PDVpts= Date: Wed, 9 Oct 2019 14:18:55 -0700 From: Andrew Morton To: William Breathitt Gray Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk, yamada.masahiro@socionext.com, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, geert@linux-m68k.org, preid@electromag.com.au, lukas@wunner.de, Andy Shevchenko , Arnd Bergmann Subject: Re: [PATCH v18 01/14] bitops: Introduce the for_each_set_clump8 macro Message-Id: <20191009141855.310f1fa8bde58df0df27b8f0@linux-foundation.org> In-Reply-To: <893c3b4f03266c9496137cc98ac2b1bd27f92c73.1570641097.git.vilhelm.gray@gmail.com> References: <893c3b4f03266c9496137cc98ac2b1bd27f92c73.1570641097.git.vilhelm.gray@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Oct 2019 13:14:37 -0400 William Breathitt Gray wrote: > This macro iterates for each 8-bit group of bits (clump) with set bits, > within a bitmap memory region. For each iteration, "start" is set to the > bit offset of the found clump, while the respective clump value is > stored to the location pointed by "clump". Additionally, the > bitmap_get_value8 and bitmap_set_value8 functions are introduced to > respectively get and set an 8-bit value in a bitmap memory region. > > ... > > +#define for_each_set_clump8(start, clump, bits, size) \ > + for ((start) = find_first_clump8(&(clump), (bits), (size)); \ > + (start) < (size); \ > + (start) = find_next_clump8(&(clump), (bits), (size), (start) + 8)) > + It wouldn't hurt to give this some documentation. In kerneldoc form, I guess.