Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438487
| From | Philipp Zabel <p.zabel@pengutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] regmap: add iopoll-like polling macro |
| Date | 2016-07-07 12:10 +0200 |
| Message-ID | <rSepP-5v6-27@gated-at.bofh.it> (permalink) |
| References | <rRVQd-1PF-1@gated-at.bofh.it> <rSe6v-59g-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Mark, thank you for the comments. 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. > > + if (sleep_us) \ > > + usleep_range((sleep_us >> 2) + 1, sleep_us); \ > > Just write / 4 rather than a shift, the compiler should do the right > thing and it's easier for readers. Ok. Since this is copied from the readx_poll_timeout macro in include/linux/iopoll.h, I should probably suggest the same change there. regards Philipp
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] regmap: add iopoll-like polling macro Philipp Zabel <p.zabel@pengutronix.de> - 2016-07-06 16:20 +0200
Re: [PATCH] regmap: add iopoll-like polling macro Mark Brown <broonie@kernel.org> - 2016-07-07 11:50 +0200
Re: [PATCH] regmap: add iopoll-like polling macro Philipp Zabel <p.zabel@pengutronix.de> - 2016-07-07 12:10 +0200
Re: [PATCH] regmap: add iopoll-like polling macro Mark Brown <broonie@kernel.org> - 2016-07-08 16:50 +0200
Re: [PATCH] regmap: add iopoll-like polling macro Philipp Zabel <p.zabel@pengutronix.de> - 2016-07-08 18:30 +0200
csiph-web