* [PATCH] ata: libata-core: Simplify ata_dev_set_xfermode()
@ 2022-08-25 22:45 Damien Le Moal
2022-08-31 10:11 ` Niklas Cassel
0 siblings, 1 reply; 2+ messages in thread
From: Damien Le Moal @ 2022-08-25 22:45 UTC (permalink / raw)
To: linux-ide; +Cc: Sergey Shtylyov
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ata: libata-core: Simplify ata_dev_set_xfermode()
2022-08-25 22:45 [PATCH] ata: libata-core: Simplify ata_dev_set_xfermode() Damien Le Moal
@ 2022-08-31 10:11 ` Niklas Cassel
0 siblings, 0 replies; 2+ messages in thread
From: Niklas Cassel @ 2022-08-31 10:11 UTC (permalink / raw)
To: Damien Le Moal; +Cc: linux-ide@vger.kernel.org, Sergey Shtylyov
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-31 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox