lkml.org 
[lkml]   [2021]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ata: ahci: ceva: Updated code by using dev_err_probe()
Date
Updated code with already prepared dev_err_probe(). It reduces code size
and simplifies EPROBE_DEFER handling.

Also, unify message format for similar error cases.

Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
---
This patch is based on ahci-ceva patches:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-next&id=5542fabd9e07d6c49c07862e73070c325f93d390

Tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/tree/?h=for-next
---
drivers/ata/ahci_ceva.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c
index b980218..a935209 100644
--- a/drivers/ata/ahci_ceva.c
+++ b/drivers/ata/ahci_ceva.c
@@ -207,9 +207,8 @@ static int ceva_ahci_probe(struct platform_device *pdev)
cevapriv->rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
NULL);
if (IS_ERR(cevapriv->rst)) {
- if (PTR_ERR(cevapriv->rst) != -EPROBE_DEFER)
- dev_err(&pdev->dev, "failed to get reset: %ld\n",
- PTR_ERR(cevapriv->rst));
+ dev_err_probe(&pdev->dev, PTR_ERR(cevapriv->rst),
+ "failed to get reset\n");
}

hpriv = ahci_platform_get_resources(pdev, 0);
--
1.7.1
\
 
 \ /
  Last update: 2021-03-04 16:57    [W:1.306 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site