kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/2] regmap: Simplify implementation of the regmap_read_poll_timeout() macro
       [not found] ` <20200420134647.9121-2-zhengdejin5@gmail.com>
@ 2020-04-20 14:35   ` Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2020-04-20 14:35 UTC (permalink / raw)
  To: Dejin Zheng, Mark Brown; +Cc: linux-kernel, kernel-janitors

…
> +++ b/include/linux/regmap.h
> @@ -122,26 +123,10 @@ struct reg_sequence {
>   */
>  #define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \
>  ({ \
> +	int __ret, __tmp; \
> +	__tmp = read_poll_timeout(regmap_read, __ret, __ret || (cond), \
> +			sleep_us, timeout_us, false, (map), (addr), &(val)); \
> +	__ret ?: __tmp; \
>  })

* Would you like to delete double underscores from these variable names?

* I find another implementation detail suspicious.
  Should the parameters “sleep_us” and “timeout_us” be enclosed by
  additional parentheses (similar to four other macro arguments)?

* Can the tag “Fixes” be relevant also for such adjustments?

Regards,
Markus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-20 14:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200420134647.9121-1-zhengdejin5@gmail.com>
     [not found] ` <20200420134647.9121-2-zhengdejin5@gmail.com>
2020-04-20 14:35   ` [PATCH v2 1/2] regmap: Simplify implementation of the regmap_read_poll_timeout() macro Markus Elfring

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).