public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	Sergey Shtylyov <s.shtylyov@omp.ru>
Subject: Re: [PATCH] ata: libata-core: Simplify ata_dev_set_xfermode()
Date: Wed, 31 Aug 2022 10:11:05 +0000	[thread overview]
Message-ID: <Yw8zuP45nxFavZrM@x1-carbon> (raw)
In-Reply-To: <20220825224519.369685-1-damien.lemoal@opensource.wdc.com>

On Fri, Aug 26, 2022 at 07:45:19AM +0900, Damien Le Moal wrote:
> The err_mask variable is not useful. Remove it.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> ---
>  drivers/ata/libata-core.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 0b62fa14a74c..d0242c75aac5 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -4295,7 +4295,6 @@ static void ata_dev_xfermask(struct ata_device *dev)
>  static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
>  {
>  	struct ata_taskfile tf;
> -	unsigned int err_mask;
>  
>  	/* set up set-features taskfile */
>  	ata_dev_dbg(dev, "set features - xfer mode\n");
> @@ -4317,10 +4316,11 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
>  	else /* In the ancient relic department - skip all of this */
>  		return 0;
>  
> -	/* On some disks, this command causes spin-up, so we need longer timeout */
> -	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 15000);
> -
> -	return err_mask;
> +	/*
> +	 * On some disks, this command causes spin-up, so we need longer
> +	 * timeout.
> +	 */
> +	return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 15000);
>  }
>  
>  /**
> -- 
> 2.37.2
> 

Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>

      reply	other threads:[~2022-08-31 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 22:45 [PATCH] ata: libata-core: Simplify ata_dev_set_xfermode() Damien Le Moal
2022-08-31 10:11 ` Niklas Cassel [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=Yw8zuP45nxFavZrM@x1-carbon \
    --to=niklas.cassel@wdc.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    /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