mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: cgel.zte@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jinpeng Cui <cui.jinpeng2@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] ata: libata-core: remove redundant err_mask variable
Date: Fri, 26 Aug 2022 07:47:46 +0900	[thread overview]
Message-ID: <b31200c7-4737-a4fe-45dd-83ad70892177@opensource.wdc.com> (raw)
In-Reply-To: <20220823122914.211355-1-cui.jinpeng2@zte.com.cn>

On 8/23/22 21:29, cgel.zte@gmail.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> 
> Return value from ata_exec_internal() directly instead of
> taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

Applied to for-6.1. Thanks !

> ---
>  drivers/ata/libata-core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 864b26009eae..0ba0e692210f 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -4340,7 +4340,6 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev)
>  unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
>  {
>  	struct ata_taskfile tf;
> -	unsigned int err_mask;
>  	unsigned int timeout = 0;
>  
>  	/* set up set-features taskfile */
> @@ -4356,9 +4355,8 @@ unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
>  	if (subcmd == SETFEATURES_SPINUP)
>  		timeout = ata_probe_timeout ?
>  			  ata_probe_timeout * 1000 : SETFEATURES_SPINUP_TIMEOUT;
> -	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, timeout);
>  
> -	return err_mask;
> +	return ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, timeout);
>  }
>  EXPORT_SYMBOL_GPL(ata_dev_set_feature);
>  


-- 
Damien Le Moal
Western Digital Research

      reply	other threads:[~2022-08-25 22:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 12:29 cgel.zte
2022-08-25 22:47 ` Damien Le Moal [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=b31200c7-4737-a4fe-45dd-83ad70892177@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=cgel.zte@gmail.com \
    --cc=cui.jinpeng2@zte.com.cn \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zealci@zte.com.cn \
    /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

all inboxes | Powered by JetHome®