public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
@ 2022-07-12 21:45 Nícolas F. R. A. Prado
  2022-07-12 22:07 ` Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-07-12 21:45 UTC (permalink / raw)
  To: Prashant Malani
  Cc: AngeloGioacchino Del Regno, kernel, Nícolas F. R. A. Prado,
	Benson Leung, Guenter Roeck, chrome-platform, linux-kernel

The typec_register_port() can fail with EPROBE_DEFER if the endpoint
node hasn't probed yet. In order to avoid spamming the log with errors
in that case, log using dev_err_probe().

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

 drivers/platform/chrome/cros_ec_typec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index d6088ba447af..8c0ca3c128ee 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -352,8 +352,8 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
 
 		cros_port->port = typec_register_port(dev, cap);
 		if (IS_ERR(cros_port->port)) {
-			dev_err(dev, "Failed to register port %d\n", port_num);
 			ret = PTR_ERR(cros_port->port);
+			dev_err_probe(dev, ret, "Failed to register port %d\n", port_num);
 			goto unregister_ports;
 		}
 
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
  2022-07-12 21:45 [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail Nícolas F. R. A. Prado
@ 2022-07-12 22:07 ` Guenter Roeck
  2022-07-13  8:16 ` AngeloGioacchino Del Regno
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2022-07-12 22:07 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Prashant Malani, AngeloGioacchino Del Regno, Collabora Kernel ML,
	Benson Leung, Guenter Roeck,
	open list:CHROME HARDWARE PLATFORM SUPPORT, linux-kernel

On Tue, Jul 12, 2022 at 2:46 PM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> The typec_register_port() can fail with EPROBE_DEFER if the endpoint
> node hasn't probed yet. In order to avoid spamming the log with errors
> in that case, log using dev_err_probe().
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

>
> ---
>
>  drivers/platform/chrome/cros_ec_typec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index d6088ba447af..8c0ca3c128ee 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -352,8 +352,8 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
>
>                 cros_port->port = typec_register_port(dev, cap);
>                 if (IS_ERR(cros_port->port)) {
> -                       dev_err(dev, "Failed to register port %d\n", port_num);
>                         ret = PTR_ERR(cros_port->port);
> +                       dev_err_probe(dev, ret, "Failed to register port %d\n", port_num);
>                         goto unregister_ports;
>                 }
>
> --
> 2.37.0
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
  2022-07-12 21:45 [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail Nícolas F. R. A. Prado
  2022-07-12 22:07 ` Guenter Roeck
@ 2022-07-13  8:16 ` AngeloGioacchino Del Regno
  2022-07-13 17:30 ` patchwork-bot+chrome-platform
  2022-07-15 19:00 ` patchwork-bot+chrome-platform
  3 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-13  8:16 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Prashant Malani
  Cc: kernel, Benson Leung, Guenter Roeck, chrome-platform,
	linux-kernel

Il 12/07/22 23:45, Nícolas F. R. A. Prado ha scritto:
> The typec_register_port() can fail with EPROBE_DEFER if the endpoint
> node hasn't probed yet. In order to avoid spamming the log with errors
> in that case, log using dev_err_probe().
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
  2022-07-12 21:45 [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail Nícolas F. R. A. Prado
  2022-07-12 22:07 ` Guenter Roeck
  2022-07-13  8:16 ` AngeloGioacchino Del Regno
@ 2022-07-13 17:30 ` patchwork-bot+chrome-platform
  2022-07-15 19:00 ` patchwork-bot+chrome-platform
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+chrome-platform @ 2022-07-13 17:30 UTC (permalink / raw)
  To: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado_=3Cnfraprado=40collabora=2Ecom?=,
	=?utf-8?q?=3E?=
  Cc: pmalani, angelogioacchino.delregno, kernel, bleung, groeck,
	chrome-platform, linux-kernel

Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci)
by Prashant Malani <pmalani@chromium.org>:

On Tue, 12 Jul 2022 17:45:54 -0400 you wrote:
> The typec_register_port() can fail with EPROBE_DEFER if the endpoint
> node hasn't probed yet. In order to avoid spamming the log with errors
> in that case, log using dev_err_probe().
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 
> 
> [...]

Here is the summary with links:
  - platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
    https://git.kernel.org/chrome-platform/c/ce838f7dc795

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
  2022-07-12 21:45 [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail Nícolas F. R. A. Prado
                   ` (2 preceding siblings ...)
  2022-07-13 17:30 ` patchwork-bot+chrome-platform
@ 2022-07-15 19:00 ` patchwork-bot+chrome-platform
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+chrome-platform @ 2022-07-15 19:00 UTC (permalink / raw)
  To: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado_=3Cnfraprado=40collabora=2Ecom?=,
	=?utf-8?q?=3E?=
  Cc: pmalani, angelogioacchino.delregno, kernel, bleung, groeck,
	chrome-platform, linux-kernel

Hello:

This patch was applied to chrome-platform/linux.git (for-next)
by Prashant Malani <pmalani@chromium.org>:

On Tue, 12 Jul 2022 17:45:54 -0400 you wrote:
> The typec_register_port() can fail with EPROBE_DEFER if the endpoint
> node hasn't probed yet. In order to avoid spamming the log with errors
> in that case, log using dev_err_probe().
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 
> 
> [...]

Here is the summary with links:
  - platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
    https://git.kernel.org/chrome-platform/c/ce838f7dc795

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-15 19:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-12 21:45 [PATCH] platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail Nícolas F. R. A. Prado
2022-07-12 22:07 ` Guenter Roeck
2022-07-13  8:16 ` AngeloGioacchino Del Regno
2022-07-13 17:30 ` patchwork-bot+chrome-platform
2022-07-15 19:00 ` patchwork-bot+chrome-platform

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox