diff mbox series

[12/15] iopoll/regmap/phy/snd: Fix comment referencing outdated timer documentation

Message ID 20240904-devel-anna-maria-b4-timers-flseep-v1-12-e98760256370@linutronix.de (mailing list archive)
State New, archived
Headers show
Series timers: Cleanup delay/sleep related mess | expand

Commit Message

Anna-Maria Behnsen Sept. 4, 2024, 1:05 p.m. UTC
Function descriptions in iopoll.h, regmap.h, phy.h and sound/soc/sof/ops.h
copied all the same outdated documentation about sleep/delay function
limitations. In those comments, the generic (and still outdated) timer
documentation file is referenced.

As proper function descriptions for used delay and sleep functions are in
place, simply update the descriptions to reference to them.

Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: netdev@vger.kernel.org
Cc: linux-sound@vger.kernel.org
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
 include/linux/iopoll.h | 24 ++++++++++++------------
 include/linux/phy.h    |  7 ++++---
 include/linux/regmap.h | 18 +++++++++---------
 sound/soc/sof/ops.h    |  6 +++---
 4 files changed, 28 insertions(+), 27 deletions(-)

Comments

Andrew Lunn Sept. 4, 2024, 2:03 p.m. UTC | #1
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 6b7d40d49129..b09490e08365 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -1374,11 +1374,12 @@ int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
>   * @regnum: The register on the MMD to read
>   * @val: Variable to read the register into
>   * @cond: Break condition (usually involving @val)
> - * @sleep_us: Maximum time to sleep between reads in us (0
> - *            tight-loops).  Should be less than ~20ms since usleep_range
> - *            is used (see Documentation/timers/timers-howto.rst).
> + * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
> + *            read usleep_range() function description for details and
> + *            limitations.
>   * @timeout_us: Timeout in us, 0 means never timeout
>   * @sleep_before_read: if it is true, sleep @sleep_us before read.
> + *
>   * Returns 0 on success and -ETIMEDOUT upon a timeout. In either

I know it is not in scope for what you are trying to fix, but there
should be a : after Returns

* Returns: 0 on success and -ETIMEDOUT upon a timeout. In either

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Anna-Maria Behnsen Sept. 5, 2024, 8:15 a.m. UTC | #2
Andrew Lunn <andrew@lunn.ch> writes:

>> diff --git a/include/linux/phy.h b/include/linux/phy.h
>> index 6b7d40d49129..b09490e08365 100644
>> --- a/include/linux/phy.h
>> +++ b/include/linux/phy.h
>> @@ -1374,11 +1374,12 @@ int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
>>   * @regnum: The register on the MMD to read
>>   * @val: Variable to read the register into
>>   * @cond: Break condition (usually involving @val)
>> - * @sleep_us: Maximum time to sleep between reads in us (0
>> - *            tight-loops).  Should be less than ~20ms since usleep_range
>> - *            is used (see Documentation/timers/timers-howto.rst).
>> + * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
>> + *            read usleep_range() function description for details and
>> + *            limitations.
>>   * @timeout_us: Timeout in us, 0 means never timeout
>>   * @sleep_before_read: if it is true, sleep @sleep_us before read.
>> + *
>>   * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
>
> I know it is not in scope for what you are trying to fix, but there
> should be a : after Returns
>
> * Returns: 0 on success and -ETIMEDOUT upon a timeout. In either

I have to do a v2 of the series anyway. So if it helps, I can add the
missing colon after "Returns" in all those function descriptions I touch
and expand the commit message by:

  While at it fix missing colon after "Returns" in function description
  as well.

> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>
>     Andrew

Thanks,

        Anna-Maria
diff mbox series

Patch

diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index 19a7b00baff4..34b52ab2e394 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -19,9 +19,9 @@ 
  * @op: accessor function (takes @args as its arguments)
  * @val: Variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @sleep_us: Maximum time to sleep between reads in us (0
- *            tight-loops).  Should be less than ~20ms since usleep_range
- *            is used (see Documentation/timers/timers-howto.rst).
+ * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
+ *            read usleep_range() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  * @sleep_before_read: if it is true, sleep @sleep_us before read.
  * @args: arguments for @op poll
@@ -64,9 +64,9 @@ 
  * @op: accessor function (takes @args as its arguments)
  * @val: Variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @delay_us: Time to udelay between reads in us (0 tight-loops).  Should
- *            be less than ~10us since udelay is used (see
- *            Documentation/timers/timers-howto.rst).
+ * @delay_us: Time to udelay between reads in us (0 tight-loops). Please
+ *            read udelay() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  * @delay_before_read: if it is true, delay @delay_us before read.
  * @args: arguments for @op poll
@@ -119,9 +119,9 @@ 
  * @addr: Address to poll
  * @val: Variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @sleep_us: Maximum time to sleep between reads in us (0
- *            tight-loops).  Should be less than ~20ms since usleep_range
- *            is used (see Documentation/timers/timers-howto.rst).
+ * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
+ *            read usleep_range() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
@@ -140,9 +140,9 @@ 
  * @addr: Address to poll
  * @val: Variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @delay_us: Time to udelay between reads in us (0 tight-loops).  Should
- *            be less than ~10us since udelay is used (see
- *            Documentation/timers/timers-howto.rst).
+ * @delay_us: Time to udelay between reads in us (0 tight-loops). Please
+ *            read udelay() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 6b7d40d49129..b09490e08365 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1374,11 +1374,12 @@  int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
  * @regnum: The register on the MMD to read
  * @val: Variable to read the register into
  * @cond: Break condition (usually involving @val)
- * @sleep_us: Maximum time to sleep between reads in us (0
- *            tight-loops).  Should be less than ~20ms since usleep_range
- *            is used (see Documentation/timers/timers-howto.rst).
+ * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
+ *            read usleep_range() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  * @sleep_before_read: if it is true, sleep @sleep_us before read.
+ *
  * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
  * case, the last read value at @args is stored in @val. Must not
  * be called from atomic context if sleep_us or timeout_us are used.
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 122e38161acb..85de129a9e02 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -106,9 +106,9 @@  struct reg_sequence {
  * @addr: Address to poll
  * @val: Unsigned integer variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @sleep_us: Maximum time to sleep between reads in us (0
- *            tight-loops).  Should be less than ~20ms since usleep_range
- *            is used (see Documentation/timers/timers-howto.rst).
+ * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
+ *            read usleep_range() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
@@ -133,9 +133,9 @@  struct reg_sequence {
  * @addr: Address to poll
  * @val: Unsigned integer variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @delay_us: Time to udelay between reads in us (0 tight-loops).
- *            Should be less than ~10us since udelay is used
- *            (see Documentation/timers/timers-howto.rst).
+ * @delay_us: Time to udelay between reads in us (0 tight-loops). Please
+ *            read udelay() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
@@ -177,9 +177,9 @@  struct reg_sequence {
  * @field: Regmap field to read from
  * @val: Unsigned integer variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @sleep_us: Maximum time to sleep between reads in us (0
- *            tight-loops).  Should be less than ~20ms since usleep_range
- *            is used (see Documentation/timers/timers-howto.rst).
+ * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
+ *            read usleep_range() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h
index 2584621c3b2d..b1b8253aefad 100644
--- a/sound/soc/sof/ops.h
+++ b/sound/soc/sof/ops.h
@@ -597,9 +597,9 @@  snd_sof_is_chain_dma_supported(struct snd_sof_dev *sdev, u32 dai_type)
  * @addr: Address to poll
  * @val: Variable to read the value into
  * @cond: Break condition (usually involving @val)
- * @sleep_us: Maximum time to sleep between reads in us (0
- *            tight-loops).  Should be less than ~20ms since usleep_range
- *            is used (see Documentation/timers/timers-howto.rst).
+ * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
+ *            read usleep_range() function description for details and
+ *            limitations.
  * @timeout_us: Timeout in us, 0 means never timeout
  *
  * Returns 0 on success and -ETIMEDOUT upon a timeout. In either