Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2884433imm; Mon, 10 Sep 2018 07:51:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbuOHDpnVsAbpOs691BfJXAdCkzxYy0pdq/lsfuPWqYrBJQ/oehGYdqFLa677TS3R5Ia2bc X-Received: by 2002:a63:31c2:: with SMTP id x185-v6mr23159023pgx.373.1536591096436; Mon, 10 Sep 2018 07:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536591096; cv=none; d=google.com; s=arc-20160816; b=LKFzMV9RPXzCiuI1OLdP6/eXQDMWqPMn0Mld8xCZn6R4TPlMITmH5vOQIeT2WyEJAS onrO8TJkBblyAzPEzBoTdJj2HNFtTnmUFJXP13txoDWGQKPV5Twb38/gYTLz3dZ4o+RV NqPOYcxOvJgau8Mr9D4zfQ3ffutloHdsbNRRz7FFZOvlQ0uEdsXkxzr9Iyo/NY3N6E9V 2mT8GeIeQqmD5EB7K4n5Chi8ztUGwqk0NpIvRjCBrM5VS0QYnaJ1jN3mGRwI/eOztmkH eAoFezjB2bjF6ToVhwaAqKSMoBhDxpqNEZ84M0EniofYj1ehOJx02Ec2JfcEHrC5NiHE 2Knw== 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=bkIZtLr2VTWZn6K4BLniKefES6Vt9AdXItc7dGN8yew=; b=GGM1BD9B5D/IEIAGAi2ByyujXDJXCpc/IukEG8mIeMIzLy6JSIrJivtbZa3xp592dD h6slWFFGAnp8f2XlgDFL4GZsjmVF5g0Scp76fGiyMT0FmdgR0P7TpmKoqsxyHlYmOMPl j3EgUl8hIxoX89TcogMrZ5FcecRX32AhFF4X1nvAvwmdRoY/Jkx6mmgL7dwxYK8CjlB2 HMJOgFekEEBPh8p2GRdJJM510QUqKdM+gdSBi76JhhKglPB+yi2/CjzA8PmHIIiYS8G7 JPuBFqXxgX8TwltpM+EjeqGT4v0+YVfq5nn1yXTglJGyUjfPq8tWTldEgaUOtOgu+/IK ihAg== 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 y67-v6si16960879pfa.47.2018.09.10.07.50.48; Mon, 10 Sep 2018 07:51:36 -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 S1728796AbeIJTlz (ORCPT + 99 others); Mon, 10 Sep 2018 15:41:55 -0400 Received: from mga18.intel.com ([134.134.136.126]:31222 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728541AbeIJTly (ORCPT ); Mon, 10 Sep 2018 15:41:54 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 07:47:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,356,1531810800"; d="scan'208";a="73070217" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga006.jf.intel.com with ESMTP; 10 Sep 2018 07:47:26 -0700 Received: from andy by smile with local (Exim 4.91) (envelope-from ) id 1fzNTI-0004r1-W6; Mon, 10 Sep 2018 17:47:24 +0300 Date: Mon, 10 Sep 2018 17:47:24 +0300 From: Andy Shevchenko To: Linus Walleij Cc: William Breathitt Gray , "open list:GPIO SUBSYSTEM" , linux-arch@vger.kernel.org, "linux-kernel@vger.kernel.org" , Andrew Morton Subject: Re: [PATCH v4 0/8] Introduce the for_each_set_clump macro Message-ID: <20180910144724.GY11447@smile.fi.intel.com> References: <20180905150348.GA27089@sophia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Sep 10, 2018 at 09:54:47AM +0200, Linus Walleij wrote: > On Wed, Sep 5, 2018 at 5:04 PM William Breathitt Gray > wrote: > > On Wed, May 16, 2018 at 04:03:51PM +0200, Linus Walleij wrote: > > >On Tue, May 15, 2018 at 6:22 PM, William Breathitt Gray > > > wrote: > > > > > >> For example, suppose you would like to iterate over a 16-bit integer 4 > > >> bits at a time, skipping over 4-bit groups with no set bit, where XXXX > > >> represents the current 4-bit group: > > >> > > >> Example: 1011 1110 0000 1111 > > >> First loop: 1011 1110 0000 XXXX > > >> Second loop: 1011 XXXX 0000 1111 > > >> Third loop: XXXX 1110 0000 1111 > > >> > > >> Each iteration of the loop returns the next 4-bit group that has at > > >> least one set bit. > > >> > > >> The for_each_set_clump macro has six parameters: > > >> > > >> * clump: set to current clump index for the iteration > > >> * index: set to current bitmap word index for the iteration > > >> * offset: bits offset of the found clump in the bitmap word > > >> * bits: bitmap to search within > > >> * size: bitmap size in number of clumps > > >> * clump_size: clump size in number of bits > > >> > > >> The clump_size argument can be an arbitrary number of bits and is not > > >> required to be a multiple of 2. > > > > > >I must say I'm impressed. Very nice arithmetics going on there. > > > > > >If I can get some ACK for the bitops patch I'd be happy to merge > > >it all through the GPIO tree. The users are pretty clear cut. > > > > > >BTW: if I could, I would pull out Donald Knuth's "The Art of Computer > > >Programming vol 4A" chapter 7.1.3 "Bitwise Tricks and Techniques" > > >to see what he has to say about the subject, but I don't have > > >that book as it turns out. > > > > > >Yours, > > >Linus Walleij > > > > Hi Linus, > > > > I'd like to get this patchset merged, but I'm aware that we haven't yet > > received additional ACKs in the past couple months. Are there any > > changes you would like made, or should I resubmit this patchset with > > additional CCs in the hopes of some ACKs for the bitops patch? > > It seems Andy wanted some time and he had ~4 months now > so either he forgot it or has way too much to do. Sorry, indeed, it got piled under huge backlog I have. > > I would say send this patch to Andrew Morton (the bitops patches) > so he can decide on it. He has the right bird's eye view on this > kind of things. Agreed, and please add Rasmus as well. -- With Best Regards, Andy Shevchenko