From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Wang Qing <wangqing@vivo.com>, Jens Axboe <axboe@kernel.dk>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] ata: sata_highbank: delete redundant print and fix return value
Date: Mon, 15 Mar 2021 11:38:10 +0300 [thread overview]
Message-ID: <c03f9a60-779c-6cdf-a16d-0309823ebc08@gmail.com> (raw)
In-Reply-To: <1615775955-4400-1-git-send-email-wangqing@vivo.com>
Hello!
On 15.03.2021 5:39, Wang Qing wrote:
> platform_get_irq() has already checked and printed the return value,
> the printing here is nothing special, and should corrected to < 0.
>
> Also, thhe return value should return a real error.
The.
It's a bad idea to mix the fix and cleanup in one patch (and to do two
things in one patch as well); also describing a bug fix as an "appendage"
to the clean up. Anyway, I had already posted the fix here:
https://marc.info/?l=linux-ide&m=161575450917827
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
> drivers/ata/sata_highbank.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
> index 64b2ef1..4438ee6
> --- a/drivers/ata/sata_highbank.c
> +++ b/drivers/ata/sata_highbank.c
> @@ -469,10 +469,8 @@ static int ahci_highbank_probe(struct platform_device *pdev)
> }
>
> irq = platform_get_irq(pdev, 0);
> - if (irq <= 0) {
> - dev_err(dev, "no irq\n");
> - return -EINVAL;
> - }
> + if (irq < 0)
> + return irq;
What about irq == 0?
[...]
MBR, Sergei
prev parent reply other threads:[~2021-03-15 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-15 2:39 [PATCH V3] ata: sata_highbank: delete redundant print and fix return value Wang Qing
2021-03-15 8:38 ` Sergei Shtylyov [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=c03f9a60-779c-6cdf-a16d-0309823ebc08@gmail.com \
--to=sergei.shtylyov@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangqing@vivo.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).