提交 614065ab 编写于 作者: J Jinpeng Cui 提交者: Damien Le Moal

ata: libata-core: remove redundant err_mask variable

Return value from ata_exec_internal() directly instead of
taking this in another redundant variable.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NJinpeng Cui <cui.jinpeng2@zte.com.cn>
Signed-off-by: NDamien Le Moal <damien.lemoal@opensource.wdc.com>
上级 fee60730
...@@ -4340,7 +4340,6 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev) ...@@ -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) unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
{ {
struct ata_taskfile tf; struct ata_taskfile tf;
unsigned int err_mask;
unsigned int timeout = 0; unsigned int timeout = 0;
/* set up set-features taskfile */ /* set up set-features taskfile */
...@@ -4356,9 +4355,8 @@ unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action) ...@@ -4356,9 +4355,8 @@ unsigned int ata_dev_set_feature(struct ata_device *dev, u8 subcmd, u8 action)
if (subcmd == SETFEATURES_SPINUP) if (subcmd == SETFEATURES_SPINUP)
timeout = ata_probe_timeout ? timeout = ata_probe_timeout ?
ata_probe_timeout * 1000 : SETFEATURES_SPINUP_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); EXPORT_SYMBOL_GPL(ata_dev_set_feature);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册