linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Wang Qing <wangqing@vivo.com>,
	Hans de Goede <hdegoede@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ata: delete redundant printing of return value
Date: Sat, 13 Mar 2021 13:04:31 +0300	[thread overview]
Message-ID: <01c746e9-51bf-0320-eb20-06e939de39b0@gmail.com> (raw)
In-Reply-To: <1615621617-1343-1-git-send-email-wangqing@vivo.com>

Hello!

   The patch subject should reflect the exact patch locus, e.g. "ata: libahci_platform:
delete redundant printing of return value".

On 3/13/21 10:46 AM, Wang Qing wrote:

> platform_get_irq() has already checked and printed the return value, 
> the printing here is nothing special, it is not necessary at all.
> 
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
>  drivers/ata/libahci_platform.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
> index de638da..2e7ea75
> --- a/drivers/ata/libahci_platform.c
> +++ b/drivers/ata/libahci_platform.c
> @@ -582,11 +582,8 @@ int ahci_platform_init_host(struct platform_device *pdev,
>  	int i, irq, n_ports, rc;
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> -		if (irq != -EPROBE_DEFER)
> -			dev_err(dev, "no irq\n");
> +	if (irq <= 0)
>  		return irq;
> -	}

   This code has more serious problem: it returns 0 on error as if it was success.
Should be changed to *if* (irq < 0) (in a separate patch).

MBR, Sergei

  reply	other threads:[~2021-03-13 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13  7:46 [PATCH 1/2] ata: delete redundant printing of return value Wang Qing
2021-03-13 10:04 ` Sergei Shtylyov [this message]
2021-03-13 12:07 ` Hans de Goede
2021-03-13  7:47 Wang Qing
2021-03-13 10:16 ` Sergei Shtylyov

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=01c746e9-51bf-0320-eb20-06e939de39b0@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=hdegoede@redhat.com \
    --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).