All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: Handle enumerated properties with gaps
Date: Mon, 11 Dec 2017 10:09:54 +0200	[thread overview]
Message-ID: <1512979794.25007.570.camel@linux.intel.com> (raw)
In-Reply-To: <20171207094209.14748-1-lars@metafoo.de>

On Thu, 2017-12-07 at 10:42 +0100, Lars-Peter Clausen wrote:

> Open for suggestions on how to massage __sysfs_match_string() into
> handling
> this use-case.

I use to have an idea to use bitmap variant of such functions.
Though I didn't find enough users to make it beneficial.

match_string_[with_gaps](...unsigned long *map, ...)
{
...
 for_each_set_bit() {
 ...
 }
...
}

So, in addition to (or instead of) passing size pass bitmap.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

      parent reply	other threads:[~2017-12-11  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  9:42 [PATCH] iio: Handle enumerated properties with gaps Lars-Peter Clausen
2017-12-10 17:19 ` Jonathan Cameron
2017-12-11  8:09 ` Andy Shevchenko [this message]

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=1512979794.25007.570.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.