[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKbuUC_sQbRjs_iv@pluto>
Date: Thu, 21 Aug 2025 11:00:48 +0100
From: Cristian Marussi <cristian.marussi@....com>
To: Sudeep Holla <sudeep.holla@....com>
Cc: Xichao Zhao <zhao.xichao@...o.com>, cristian.marussi@....com,
jassisinghbrar@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mailbox: arm_mhuv3: Remove dev_err_probe() if error is
-ENOMEM
On Thu, Aug 21, 2025 at 10:53:18AM +0100, Sudeep Holla wrote:
> On Thu, Aug 21, 2025 at 05:32:53PM +0800, Xichao Zhao wrote:
Hi,
> > The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
> > Therefore, remove the useless call to dev_err_probe(), and just
> > return the value instead.
> >
>
Looking at dev_err_probe() comments...
/**
* dev_err_probe - probe error check and log helper
* @dev: the pointer to the struct device
* @err: error value to test
* @fmt: printf-style format string
* @...: arguments as specified in the format string
[snip]
* Using this helper in your probe function is totally fine even if @err <<<<
* is known to never be -EPROBE_DEFER.
* The benefit compared to a normal dev_err() is the standardized format
* of the error code, which is emitted symbolically (i.e. you get "EAGAIN"
* instead of "-35"), and having the error code returned allows more
* compact error paths.
*
* Returns @err.
I have not a strong opinion but it seems to me un-needed and potentially
impacting future backporting...IOW for me, as the mailbox maintaner prefers.
Thanks,
Cristian
Powered by blists - more mailing lists