Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1194067ybp; Wed, 9 Oct 2019 10:09:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy26AEVdyE02VFRw03mBhD2vrZDRI611L6C+4aaxFfRfdzauXdkmUl5K/PC+UxnLEtBvO0r X-Received: by 2002:aa7:dc50:: with SMTP id g16mr4002761edu.67.1570640995016; Wed, 09 Oct 2019 10:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570640995; cv=none; d=google.com; s=arc-20160816; b=g1NrFmyUij1NFT8isWy79b8T1uEmkQTXW3+mYtCNx/GKHJwyxaGU1nbzdsJ5jNShv1 zYW3NjD7Gkh1nnFQqs/kzO/JHBICOyBmDsgw1jS2HhqhXTN+ZF6Nst2gUnnzJvlctbqD x+4Ht2dZw+7+gej25/GadNoUEjN3UCb1PwW0M8bJjWVYNtKQZDYE5+Ae0E3cmyj2v9wC pLfLZ4qCMBdZ5nsFkFEbo71n+Ec1mbISGW6VcsswczLyIebA6b/2+deLCS3YrcZrk9Nx xkwoAHpyo+uA2hF6+IhG28+tTGUkpIPV4HdJKP3seqDMKjEDGmdQYBzrKQyAuzB34HAu Qm7Q== 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=KREgeSO4Afu2yZOwPU9OAgnj1g1sZmWpwTm0GZJ7Jao=; b=QsCPsMGR3iY9bFoB2S+s+ry/gAoEY/YuUyS5AwX6fdI1A63/2uU3CO5DHnuPgD+rg/ wPqRjRJFaN1QcNSeYpMMsxjTBeIkmD74797QMqY2ctQXpNMCufj3frHB54vIb0YQkevB lBCK6dle4R2uV2jI7ffh5G5se6hOtd+YdItRyJEPCH3vsB/cNr5zdwb/4kL8FuBi2TBM wDUV1Icd4Kk8xx6YtTonCsVjuRAFN8XvYTbrVxdxH7VUNUjveJ4js+7exhjZOFe1/FvI l4xf0ZyDN15dip1Uu4wtT1nPZ2WJ+UDTiIe4v+UkVTu8Hl8Jm+5sFh5zyxVRcenh3Ot0 QwbQ== 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 i22si1438867ejr.267.2019.10.09.10.09.28; Wed, 09 Oct 2019 10:09:55 -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 S1731893AbfJIRJY (ORCPT + 99 others); Wed, 9 Oct 2019 13:09:24 -0400 Received: from mga04.intel.com ([192.55.52.120]:26159 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731375AbfJIRJX (ORCPT ); Wed, 9 Oct 2019 13:09:23 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2019 10:09:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,277,1566889200"; d="scan'208";a="206918443" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001.fm.intel.com with ESMTP; 09 Oct 2019 10:09:19 -0700 Received: from andy by smile with local (Exim 4.92.2) (envelope-from ) id 1iIFSf-00036t-U0; Wed, 09 Oct 2019 20:09:17 +0300 Date: Wed, 9 Oct 2019 20:09:17 +0300 From: Andy Shevchenko To: Masahiro Yamada Cc: William Breathitt Gray , Linus Walleij , Bartosz Golaszewski , Andrew Morton , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , linux-arch , Rasmus Villemoes , linux-arm-kernel , Linux PM mailing list , Geert Uytterhoeven , preid@electromag.com.au, Lukas Wunner , sean.nyekjaer@prevas.dk, morten.tiljeset@prevas.dk, Arnd Bergmann Subject: Re: [PATCH v17 01/14] bitops: Introduce the for_each_set_clump8 macro Message-ID: <20191009170917.GG32742@smile.fi.intel.com> References: <893c3b4f03266c9496137cc98ac2b1bd27f92c73.1570633189.git.vilhelm.gray@gmail.com> 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 Thu, Oct 10, 2019 at 01:28:08AM +0900, Masahiro Yamada wrote: > On Thu, Oct 10, 2019 at 12:27 AM 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. > Why is the return type "unsigned long" where you know > it return the 8-bit value ? Because bitmap API operates on unsigned long type. This is not only consistency, but for sake of flexibility in case we would like to introduce more calls like clump16 or so. Same comment for the rest. -- With Best Regards, Andy Shevchenko