linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Piyush Mehta <piyush.mehta@xilinx.com>, <axboe@kernel.dk>
Cc: <linux-ide@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<git@xilinx.com>, <sgoud@xilinx.com>, <michal.simek@xilinx.com>
Subject: Re: [PATCH] ata: ahci: ceva: Updated code by using dev_err_probe()
Date: Thu, 4 Mar 2021 17:22:59 +0100	[thread overview]
Message-ID: <d67580bc-6178-6c7f-54c8-a3dffe8d554d@xilinx.com> (raw)
In-Reply-To: <20210304155309.17878-2-piyush.mehta@xilinx.com>



On 3/4/21 4:53 PM, Piyush Mehta wrote:
> 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");
>  	}

I got it twice not sure why.

nit: Sorry I didn't spot it in the first internal review.
But you can also remove that {} around.

With that fixed please add my
Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal


      reply	other threads:[~2021-03-04 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 15:53 [PATCH] ata: ahci: ceva: Updated code by using dev_err_probe() Piyush Mehta
2021-03-04 15:53 ` Piyush Mehta
2021-03-04 16:22   ` Michal Simek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d67580bc-6178-6c7f-54c8-a3dffe8d554d@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=axboe@kernel.dk \
    --cc=git@xilinx.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=piyush.mehta@xilinx.com \
    --cc=sgoud@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).