From: Lukas Wunner <lukas@wunner.de>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
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 <andy.shevchenko@gmail.com>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v13 01/11] bitops: Introduce the for_each_set_clump8 macro
Date: Thu, 28 Mar 2019 08:30:49 +0100 [thread overview]
Message-ID: <20190328073049.jpizz6uio7er2sjv@wunner.de> (raw)
In-Reply-To: <20190328043013.GA3251@icarus>
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
next prev parent reply other threads:[~2019-03-28 7:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-27 4:57 [PATCH v13 00/11] Introduce the for_each_set_clump8 macro William Breathitt Gray
2019-03-27 4:58 ` [PATCH v13 01/11] bitops: " William Breathitt Gray
2019-03-27 6:42 ` Lukas Wunner
2019-03-28 4:30 ` William Breathitt Gray
2019-03-28 7:30 ` Lukas Wunner [this message]
2019-03-27 12:30 ` Andy Shevchenko
2019-03-27 4:59 ` [PATCH v13 02/11] lib/test_bitmap.c: Add for_each_set_clump8 test cases William Breathitt Gray
2019-03-27 4:59 ` [PATCH v13 03/11] gpio: 104-dio-48e: Utilize for_each_set_clump8 macro William Breathitt Gray
2019-03-27 4:59 ` [PATCH v13 04/11] gpio: 104-idi-48: " William Breathitt Gray
2019-03-27 5:00 ` [PATCH v13 05/11] gpio: gpio-mm: " William Breathitt Gray
2019-03-27 5:00 ` [PATCH v13 06/11] gpio: ws16c48: " William Breathitt Gray
2019-03-27 5:00 ` [PATCH v13 07/11] gpio: pci-idio-16: " William Breathitt Gray
2019-03-27 5:01 ` [PATCH v13 08/11] gpio: pcie-idio-24: " William Breathitt Gray
2019-03-27 5:02 ` [PATCH v13 09/11] gpio: uniphier: " William Breathitt Gray
2019-03-27 5:02 ` [PATCH v13 10/11] gpio: 74x164: Utilize the " William Breathitt Gray
2019-03-27 12:33 ` Andy Shevchenko
2019-03-28 4:40 ` William Breathitt Gray
2019-03-28 9:11 ` Andy Shevchenko
2019-03-27 5:02 ` [PATCH v13 11/11] thermal: intel: intel_soc_dts_iosf: Utilize " William Breathitt Gray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190328073049.jpizz6uio7er2sjv@wunner.de \
--to=lukas@wunner.de \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=bgolaszewski@baylibre.com \
--cc=geert@linux-m68k.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=preid@electromag.com.au \
--cc=vilhelm.gray@gmail.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).