mmc: moxart: Remove unused variable 'dma_time' and 'pio_time'
diff mbox series

Message ID 1617357231-93064-1-git-send-email-yang.lee@linux.alibaba.com
State Accepted
Commit ae3519b6abc2b9ec5eda05f735681820c0535c81
Headers show
Series
  • mmc: moxart: Remove unused variable 'dma_time' and 'pio_time'
Related show

Commit Message

Yang Li April 2, 2021, 9:53 a.m. UTC
Fixes the following W=1 kernel build warning(s):

drivers/mmc/host/moxart-mmc.c:257:7: warning: variable ‘dma_time’ set
but not used
drivers/mmc/host/moxart-mmc.c:395:7: warning: variable ‘pio_time’ set
but not used

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/mmc/host/moxart-mmc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Ulf Hansson April 12, 2021, 7:52 a.m. UTC | #1
On Fri, 2 Apr 2021 at 11:53, Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/mmc/host/moxart-mmc.c:257:7: warning: variable ‘dma_time’ set
> but not used
> drivers/mmc/host/moxart-mmc.c:395:7: warning: variable ‘pio_time’ set
> but not used
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/moxart-mmc.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
> index 89bff4e..bde2988 100644
> --- a/drivers/mmc/host/moxart-mmc.c
> +++ b/drivers/mmc/host/moxart-mmc.c
> @@ -257,7 +257,6 @@ static void moxart_dma_complete(void *param)
>  static void moxart_transfer_dma(struct mmc_data *data, struct moxart_host *host)
>  {
>         u32 len, dir_slave;
> -       long dma_time;
>         struct dma_async_tx_descriptor *desc = NULL;
>         struct dma_chan *dma_chan;
>
> @@ -294,8 +293,8 @@ static void moxart_transfer_dma(struct mmc_data *data, struct moxart_host *host)
>
>         data->bytes_xfered += host->data_remain;
>
> -       dma_time = wait_for_completion_interruptible_timeout(
> -                  &host->dma_complete, host->timeout);
> +       wait_for_completion_interruptible_timeout(&host->dma_complete,
> +                                                 host->timeout);
>
>         dma_unmap_sg(dma_chan->device->dev,
>                      data->sg, data->sg_len,
> @@ -395,7 +394,6 @@ static void moxart_prepare_data(struct moxart_host *host)
>  static void moxart_request(struct mmc_host *mmc, struct mmc_request *mrq)
>  {
>         struct moxart_host *host = mmc_priv(mmc);
> -       long pio_time;
>         unsigned long flags;
>         u32 status;
>
> @@ -431,8 +429,8 @@ static void moxart_request(struct mmc_host *mmc, struct mmc_request *mrq)
>                         spin_unlock_irqrestore(&host->lock, flags);
>
>                         /* PIO transfers start from interrupt. */
> -                       pio_time = wait_for_completion_interruptible_timeout(
> -                                  &host->pio_complete, host->timeout);
> +                       wait_for_completion_interruptible_timeout(&host->pio_complete,
> +                                                                 host->timeout);
>
>                         spin_lock_irqsave(&host->lock, flags);
>                 }
> --
> 1.8.3.1
>

Patch
diff mbox series

diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart-mmc.c
index 89bff4e..bde2988 100644
--- a/drivers/mmc/host/moxart-mmc.c
+++ b/drivers/mmc/host/moxart-mmc.c
@@ -257,7 +257,6 @@  static void moxart_dma_complete(void *param)
 static void moxart_transfer_dma(struct mmc_data *data, struct moxart_host *host)
 {
 	u32 len, dir_slave;
-	long dma_time;
 	struct dma_async_tx_descriptor *desc = NULL;
 	struct dma_chan *dma_chan;
 
@@ -294,8 +293,8 @@  static void moxart_transfer_dma(struct mmc_data *data, struct moxart_host *host)
 
 	data->bytes_xfered += host->data_remain;
 
-	dma_time = wait_for_completion_interruptible_timeout(
-		   &host->dma_complete, host->timeout);
+	wait_for_completion_interruptible_timeout(&host->dma_complete,
+						  host->timeout);
 
 	dma_unmap_sg(dma_chan->device->dev,
 		     data->sg, data->sg_len,
@@ -395,7 +394,6 @@  static void moxart_prepare_data(struct moxart_host *host)
 static void moxart_request(struct mmc_host *mmc, struct mmc_request *mrq)
 {
 	struct moxart_host *host = mmc_priv(mmc);
-	long pio_time;
 	unsigned long flags;
 	u32 status;
 
@@ -431,8 +429,8 @@  static void moxart_request(struct mmc_host *mmc, struct mmc_request *mrq)
 			spin_unlock_irqrestore(&host->lock, flags);
 
 			/* PIO transfers start from interrupt. */
-			pio_time = wait_for_completion_interruptible_timeout(
-				   &host->pio_complete, host->timeout);
+			wait_for_completion_interruptible_timeout(&host->pio_complete,
+								  host->timeout);
 
 			spin_lock_irqsave(&host->lock, flags);
 		}