Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp342162img; Thu, 28 Mar 2019 00:31:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMJhaj+Y39sa2Z0WtRwBu2BcEwTJjKDqxRvHt+FpDQmRIjWZle84eTuOAvdZjoJRvTmriB X-Received: by 2002:a65:40c5:: with SMTP id u5mr37843161pgp.275.1553758302618; Thu, 28 Mar 2019 00:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553758302; cv=none; d=google.com; s=arc-20160816; b=aOM5XPueEnQEiYKRIkoLJwNFghmmxtzZ+F/WUSWpSyFpf0v+i4LuAJaXeU6+N3A5ol JNjY2Ge6OTOa94A6kgZ7/LjBS2N/5B/S6kSvQH2zfS/eapmpO7aLjqxnSr5rHN/4U6f8 4aOXHX0SR4xJRWozuvKUihuZIO0+Z3sS/4MinVj3AnHx4zyXfyAm078LI0+QBR0VTV97 hwWscFn3jZZy+ro9m3TkFvCzbJbziffnvk2LtYC28vNk/q8GPLNSs5oRmBxLaIRXyQaK kY0riwFr9DN59g+Aj2Wws7IneW53A/a1hV//9iQGtf7OFjn2SRNwDtYJSMgRKFUv6jBb AkRw== 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; bh=8rzSn5hPTzphxrt2ok6xy3qMRzUsv4WGZ5xpOu7DIxc=; b=u+XUovXcMZWsGCBPDLdJZ5Lm5A0VciFB3hyOiwMTyLjCnu/EJOV2Q+3PS7b0aWPiZG 6+wSgBD5fKQEm6Nye6atCz1lrDGFxOhwwWJQW7temjSlL2+CLhOEHoMohlyQ406USEBE lXcPKp2nnyu0YNh6wa7yoGL6Y/NnQUdoH23oAZAt6T9kVcHnsQW9oXby9oLOeK+UhCx8 Gd0mVSha6ccFx2wjTVtNjFLQLGMfd+xJa1U8COiL+fOVdjGgH1B1nmDvIUNzOFM5qUL4 6PGWDHH26uzcpsFFr/UsgshXA2XsM+m43liosKMIVV1LHmMLs+oW43NzuSdSaq0YtTax U1fg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si19574367pgq.305.2019.03.28.00.31.26; Thu, 28 Mar 2019 00:31:42 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726242AbfC1Hax (ORCPT + 99 others); Thu, 28 Mar 2019 03:30:53 -0400 Received: from bmailout2.hostsharing.net ([83.223.90.240]:40361 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbfC1Hax (ORCPT ); Thu, 28 Mar 2019 03:30:53 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 3F22F2800B3E2; Thu, 28 Mar 2019 08:30:50 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id E530757552; Thu, 28 Mar 2019 08:30:49 +0100 (CET) Date: Thu, 28 Mar 2019 08:30:49 +0100 From: Lukas Wunner To: William Breathitt Gray Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, akpm@linux-foundation.org, linux-gpio@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@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, Andy Shevchenko , Arnd Bergmann Subject: Re: [PATCH v13 01/11] bitops: Introduce the for_each_set_clump8 macro Message-ID: <20190328073049.jpizz6uio7er2sjv@wunner.de> References: <497dc4b5b1f668b54e008e10a43d4108f4a41213.1553661964.git.vilhelm.gray@gmail.com> <20190327064254.lwj7ew37mxphieco@wunner.de> <20190328043013.GA3251@icarus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190328043013.GA3251@icarus> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 01:30:13PM +0900, William Breathitt Gray wrote: > On Wed, Mar 27, 2019 at 07:42:54AM +0100, Lukas Wunner wrote: > > On Wed, Mar 27, 2019 at 01:58:45PM +0900, 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. > > > > I would have preferred static inlines for bitmap_get_value8(), > > bitmap_set_value8() and find_next_clump8() to make this as fast > > as possible in the callers because I've personally worked with > > an industrial application where the GPIO pins of a 74x164 are > > written every 250 usec. > > I'm not sure these can be static inline since the symbols are exported > for use outside this file. By static inlines I meant that the functions are moved to the appropriate header file in include/linux/. You don't need to worry about exporting in that case as the code is local to each module. For smallish functions like these, static inlines are usually fine. See drivers/dma/virt-dma.h for an extreme case of static inlines (as compared to the much smaller virt-dma.c). Thanks, Lukas