Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4328688imm; Mon, 14 May 2018 06:07:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrkjTpm0U6LAGwp7hDQowKX+QSaFNnzblBMdCFBCE0XEUZ8eoStGui/hFHpYOxRbT+y2agl X-Received: by 2002:a63:9a02:: with SMTP id o2-v6mr8402585pge.439.1526303221065; Mon, 14 May 2018 06:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526303221; cv=none; d=google.com; s=arc-20160816; b=Lyc+XHCCbyfzRx9Fm5M2hzEA6aMEcDkDik0dlVr0TyBi3ds9Chr1ehMiXGGy1RLMqo 3UsWSmg8WSSRc7cXQRGz7kUJX5nE34A28Zft354gbfBhxIVSAvndXZt0HrcrjWK+u93k vHGPMUouvBnXv2T9sLqiHjVAFWi7yd7ruvY1AjzV2iw8GI+gHRo5+w0EpMCCoOxkaFw9 tSFzq0mcTvSWRVSMitXYw+DGkV3NG62GxVywmSi6jzo/vmnQVaIzfqKWlA7gx83IGIyK I0Yc2l3CBPdFKfHPa8mPIAh+s+RIEP5PUBKNVoo7s1JDuPX5hEk0KC+/EwT5vaz1Ig18 +UOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=AiX5zXgkM/jr+EPfqt+srmNWlMhf+fB4F9KIGeJKVXw=; b=yGu7ahIEudbQ3agZdaKaC1jfIpq57ELRkYDpFB8P+yAk3y1F2jdcgwJufjZnfV32fs JezhqZY7NNl1GG2abQf8m+J1nS7C8JkhPbh4BWAxciS2fJ1sZ+rNl2xywPhjBCHpmdCv NT0EiWIM7cDxdZ4FlTV29XNHloqLp4SS2tZBmIxjlrA2FPwZIt30tLlBhqs71RbMeUaa QQIfkhBTN2O4ZWBhb+oemuj6BVGmuxvds2bTYPK8dE2KPKnUdknEyPceTTOXJWzvswm9 i8GORzfY91KGD6YYP59WJW3BO7EQf1t7/HHVO2F8uYD1VdTPdZs8tJtm1fjLq1Ajn54g 5sPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hflXlt3Y; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4-v6si8931754plo.526.2018.05.14.06.06.46; Mon, 14 May 2018 06:07:01 -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=@gmail.com header.s=20161025 header.b=hflXlt3Y; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932128AbeENNEo (ORCPT + 99 others); Mon, 14 May 2018 09:04:44 -0400 Received: from mail-yb0-f172.google.com ([209.85.213.172]:37735 "EHLO mail-yb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142AbeENNEl (ORCPT ); Mon, 14 May 2018 09:04:41 -0400 Received: by mail-yb0-f172.google.com with SMTP id i13-v6so4090465ybl.4; Mon, 14 May 2018 06:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AiX5zXgkM/jr+EPfqt+srmNWlMhf+fB4F9KIGeJKVXw=; b=hflXlt3YchiPovRJzpDKppLN1ynv8TREpkFB3izxbEZccYfZ9byB25XcR5QMT4fhXK A2/IhIYFC/0Ak9Zko9YCcLp9/7cozreve7M+Lm57n44krsDQJws49DeEhR9xtY+eE2Ly 96/NDx3rrFka+e+c06wqE2p3vy1fybW2fJvmih0/pEdYRsaBfCA8Or4ggCExHbpSIAmn ibYL/KvaXWCoESn+f63BpFsp3xnR5YfpzYMPUZk7GbvJp7Kfuqrt9sDdpcw3L96xqcX9 xxCgeDhcsz0eKGuYyhcIl1Fpux3s8GTUuPkQzPCnKiKsVQDAIYtTiNJLZZQq7otdGkpE DVTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AiX5zXgkM/jr+EPfqt+srmNWlMhf+fB4F9KIGeJKVXw=; b=dDKFqmqsctAMmh/2OICp/gmJSXJCpy6/LRmX7hjSmvuqUlNxusi2ZNf54X9geuoVPh gZ0q0na1mC5FtwBa5YhiCnecSujPr00qEDUIxLsn60763aN0Ca1GLNlnsBbae1ymrJzd sMkPqXd7rdxLrkl3fHTJUiUKkPDG6fS3UcD4Kdk8hfmflzgwe4ybSck7xucmUn+eGuBO 2mvV7z61o7G6xxKkUnB/OpQsw1SmsmR3CdfcyJ7qniad+pwMcnKNiSxKwisqeMGCWpAY v8Tx/VwF9HA/Wrvk3VL4Yj/HnUD5wZtEzn7GD1irzUFXJbYmD21p+Y/3rEO9OjjN8ULj yZTQ== X-Gm-Message-State: ALKqPwc0MDHtM1BDBILnmB4V0vCQNuK8Cul7r0AeY9G/kmidlwHGSPe7 C4tl/37aJA38rakYyCdSzxQ= X-Received: by 2002:a25:a093:: with SMTP id y19-v6mr6580209ybh.351.1526303081165; Mon, 14 May 2018 06:04:41 -0700 (PDT) Received: from sophia ([72.188.97.40]) by smtp.gmail.com with ESMTPSA id o13-v6sm2799925ywi.30.2018.05.14.06.04.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 May 2018 06:04:40 -0700 (PDT) Date: Mon, 14 May 2018 09:04:38 -0400 From: William Breathitt Gray To: Andy Shevchenko Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux-Arch , Linux Kernel Mailing List , Arnd Bergmann Subject: Re: [PATCH v2 1/7] bitops: Introduce the for_each_set_port_word macro Message-ID: <20180514130438.GB20325@sophia> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 13, 2018 at 06:06:42PM +0300, Andy Shevchenko wrote: >On Tue, May 8, 2018 at 4:26 PM, William Breathitt Gray > wrote: >> This macro iterates for each group of bits (port word) with set bits, >> within a bitmap memory region. For each iteration, "port_word" is set to >> the found port word index, "word_index" is set to the word index of the >> bitmap containing the found port word, and "word_offset" is set to the >> bit offset of the found port word within the respective bitmap word. > >Isn't that idea we discussed some time ago? That's right, I found the time to implement the macro suggestion you made during the get_multiple/set_multiple patchset for the PC104 GPIO drivers a while ago. This macro greatly simplifies the callback function implementations in those drivers and reduces the repeated code that kept appearing among those drivers. Hopefully it can be useful for other drivers as well. > >In any case, part "port" is too specific for a generic function like >this. Please, get rid of it completely. No-one knows what port means >here. Just makes a lot of confusion. Okay, I'll come up with a better name and submit a version 3 of this patchset. > >> --- a/lib/find_bit.c >> +++ b/lib/find_bit.c >> @@ -20,6 +20,7 @@ >> #include >> #include >> #include > >> +#include > >No need. It's included by bitmap.h IIRC. Ah, you are correct, I'll remove this line then. William Breathitt Gray > > >-- >With Best Regards, >Andy Shevchenko