Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2356977ybp; Thu, 10 Oct 2019 06:19:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+G7Ab9kPoOPQrn1u/KUU0SDfkAI9aprnmFnMgK5PbAE9qK6D3lmMuVk4fkGUcayeDKjgd X-Received: by 2002:a05:6402:323:: with SMTP id q3mr8201966edw.166.1570713560857; Thu, 10 Oct 2019 06:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570713560; cv=none; d=google.com; s=arc-20160816; b=a+qdKeKAk+j9vByKfrFYkCy5EkD2yJcbdM9l8m7k5b2wFDEJZIw4dzwCp+4LVZPhVV Thpbnjj9JDo5erMFtvKrFo9utWwiDy8ci7lVDajFGt7Bg5gWXulRw47Wqn7SPRAowg4Z WFsIqrBQTV415aXH3N/rivmbj4xNtvpgazJznkjR6m9Bqm1G+HRbQ2QLjmHXms51SqeR 3Nvt3Nrz+cUISzM2j63qZWelsYxvgj1fMGLSqJVeOEkzc0YCgWnEDEv2spCfsTn5ZWzs oSRZz6D1UFMoufwtBb1V6Y+WkdXt3IRv76EYcw8yonWD1a4qvuDaFnV0T6bYMjyZyx9V navw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8dySaRa5eWBgds8C5CElmcVq4ABz1/hmIEITiIR3Nmg=; b=XXKxf5TQlTyRwh43jwk34zIpRM259/YXe7GF65O15tp2gY3JtPS0T7yRqaxOhm8weM X57jkMVz/dWtbT0XFUrhNts/gPBp7gA7zkHOjvDn6IWs8jHuEGmeRhDZgAOiB1aNh2Vk vUiUJL4H+Z72qIv5QJAPzDdfYHzUPcBbQiRSZmbeYUIP1xDrVPrwRUwUv1bn6tYyAXNc KLmRv2ayXwU9V2PAnZbyK2WWG5MUYf0RPad4nJ5cNw6MNyNEKmKtDyVqDyrkA8lF5/eM 0oJ48uaRED5rH08vsEHzkyy0vj5lu0nZkOracpKo1BWJCENtot5YZdsG8Da9AEyN73nD l3MQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10si3028263ejr.222.2019.10.10.06.18.56; Thu, 10 Oct 2019 06:19:20 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388066AbfJJNSs (ORCPT + 99 others); Thu, 10 Oct 2019 09:18:48 -0400 Received: from mga04.intel.com ([192.55.52.120]:2738 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387664AbfJJNSs (ORCPT ); Thu, 10 Oct 2019 09:18:48 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2019 06:18:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,280,1566889200"; d="scan'208";a="277774911" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001.jf.intel.com with ESMTP; 10 Oct 2019 06:18:43 -0700 Received: from andy by smile with local (Exim 4.92.2) (envelope-from ) id 1iIYL4-0006iA-Ey; Thu, 10 Oct 2019 16:18:42 +0300 Date: Thu, 10 Oct 2019 16:18:42 +0300 From: Andy Shevchenko To: Andrew Morton Cc: William Breathitt Gray , linus.walleij@linaro.org, bgolaszewski@baylibre.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, 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, Arnd Bergmann Subject: Re: [PATCH v18 01/14] bitops: Introduce the for_each_set_clump8 macro Message-ID: <20191010131842.GT32742@smile.fi.intel.com> References: <893c3b4f03266c9496137cc98ac2b1bd27f92c73.1570641097.git.vilhelm.gray@gmail.com> <20191009141855.310f1fa8bde58df0df27b8f0@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009141855.310f1fa8bde58df0df27b8f0@linux-foundation.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 09, 2019 at 02:18:55PM -0700, Andrew Morton wrote: > 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. Good idea! William, I have just tested your series with a complex hardware setup, everything works to me. I think I may give Tested-by: Andy Shevchenko for this patch as well. -- With Best Regards, Andy Shevchenko