Re: [PATCH v2 2/9] i2c: riic: Use local `dev` pointer in `dev_err_probe()`

Wolfram Sang
2024-12-20T21:18:12Z

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

On Wed, Dec 18, 2024 at 12:16:11AM +0000, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Update the `riic_init_hw()` function to use the local `dev` pointer in
> calls to `dev_err_probe()`. Previously, `riic_init_hw()` used
> `riic->adapter.dev` in error reporting. Since this function is invoked
> during the probe phase, the I2C adapter is not yet initialized, leading to
> `(null) ...` being printed in error messages. This patch fixes the issue by
> consistently using the local `dev` pointer, which points to
> `riic->adapter.dev.parent`.
>
> Additionally, replace `dev_err()` with `dev_err_probe()` throughout
> `riic_init_hw()` for consistency.
>
> Fixes: d982d66514192 ("i2c: riic: remove clock and frequency restrictions")
> Fixes: 71dacb2565ed (i2c: riic: Simplify unsupported bus speed handling")
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Maybe patches 1+2 can be squashed, but I leave this to Andi.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

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