mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] regmap: add iopoll-like polling macro
Date: Fri, 8 Jul 2016 16:39:25 +0200	[thread overview]
Message-ID: <20160708143925.GY6247@sirena.org.uk> (raw)
In-Reply-To: <1467885703.4236.40.camel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

On Thu, Jul 07, 2016 at 12:01:43PM +0200, Philipp Zabel wrote:
> Am Donnerstag, den 07.07.2016, 11:42 +0200 schrieb Mark Brown:
> > On Wed, Jul 06, 2016 at 04:19:41PM +0200, Philipp Zabel wrote:

> > > This patch adds a macro regmap_read_poll_timeout that works similar
> > > to the readx_poll_timeout defined in linux/iopoll.h, except that this
> > > can also return the error value returned by a failed regmap_read.

> > Please make this a proper function.

> I can't, the condition has to be evaluated inside the loop. This is
> basically a poor man's function template.

Given that the condition is always going to be essentially the same one
checking that (read & mask) == value we could just parameterize it
couldn't we?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-07-08 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 14:19 Philipp Zabel
2016-07-07  9:42 ` Mark Brown
2016-07-07 10:01   ` Philipp Zabel
2016-07-08 14:39     ` Mark Brown [this message]
2016-07-08 16:26       ` Philipp Zabel
2016-07-13  7:37         ` Philipp Zabel
2016-07-14 16:29           ` Mark Brown
2016-07-15 12:44 ` Applied "regmap: add iopoll-like polling macro" to the regmap tree Mark Brown

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=20160708143925.GY6247@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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

all inboxes | Powered by JetHome®