Re: [PATCH 1/4] iopoll: Generalize read_poll_timeout() into poll_timeout_us()

From: Jani Nikula
Date: Fri Jul 04 2025 - 04:45:21 EST


On Thu, 03 Jul 2025, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote:
> On Thu, Jul 03, 2025 at 01:34:36AM +0300, Ville Syrjälä wrote:
>>-#define read_poll_timeout(op, val, cond, sleep_us, timeout_us, \
>>- sleep_before_read, args...) \
>>+#define poll_timeout_us(op, cond, sleep_us, timeout_us, sleep_before_op) \
>
> nit: could use use usec/msec etc that pairs nicely with USEC_PER_SEC
> and friends, also used by tools like perf and are a little bit more
> greppable than ms/us?

This horrendous quick and dirty git grep popularity contest says _us/_ms
suffixes are much more popular than _usec/_msec in kernel:

$ git grep -aoh "_[mu]s\(ec\)\?[^a-zA-Z0-9_]" | sed 's/[^a-zA-Z0-9_]$//' | sort | uniq -c | sort -rn
8603 _us
5901 _ms
1214 _usec
736 _msec

BR,
Jani.

--
Jani Nikula, Intel