Re: [PATCH 04/17] i3c: master: Replace WARN_ON() with dev_err() in i3c_dev_free_ibi_locked()

Frank Li
2025-12-19T16:26:05Z

On Fri, Dec 19, 2025 at 04:45:21PM +0200, Adrian Hunter wrote:
> IBI disable failures are not indicative of a software bug, so using
> WARN_ON() is not appropriate. Replace these warnings with dev_err().
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> drivers/i3c/master.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index e6384bffd4ae..ff6cbc044787 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -3113,8 +3113,11 @@ void i3c_dev_free_ibi_locked(struct i3c_dev_desc *dev)
> if (!dev->ibi)
> return;
>
> - if (WARN_ON(dev->ibi->enabled))
> - WARN_ON(i3c_dev_disable_ibi_locked(dev));
> + if (dev->ibi->enabled) {
> + dev_err(&master->dev, "Freeing IBI that is still enabled\n");
> + if (i3c_dev_disable_ibi_locked(dev))
> + dev_err(&master->dev, "Failed to disable IBI before freeing\n");
> + }
>
> master->ops->free_ibi(dev);
>
> --
> 2.51.0
>
>
> --
> linux-i3c mailing list
> linux-i3c@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c