linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] memstick: remove set but not used variable 'data'
@ 2019-04-11  2:59 YueHaibing
  2019-04-11 11:01 ` Ulf Hansson
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-04-11  2:59 UTC (permalink / raw)
  To: Will Deacon, ulf.hansson, axboe, osandov, hare
  Cc: YueHaibing, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_issue_cmd':
drivers/memstick/host/jmb38x_ms.c:371:17: warning:
 variable 'data' set but not used [-Wunused-but-set-variable]

It's never used since introduction and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/memstick/host/jmb38x_ms.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index e3a5af65dbce..acec09813419 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -368,7 +368,6 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
 static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
 {
 	struct jmb38x_ms_host *host = memstick_priv(msh);
-	unsigned char *data;
 	unsigned int data_len, cmd, t_val;
 
 	if (!(STATUS_HAS_MEDIA & readl(host->addr + STATUS))) {
@@ -400,8 +399,6 @@ static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
 			cmd |= TPC_WAIT_INT;
 	}
 
-	data = host->req->data;
-
 	if (!no_dma)
 		host->cmd_flags |= DMA_DATA;




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] memstick: remove set but not used variable 'data'
  2019-04-11  2:59 [PATCH -next] memstick: remove set but not used variable 'data' YueHaibing
@ 2019-04-11 11:01 ` Ulf Hansson
  2019-04-11 12:23   ` YueHaibing
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2019-04-11 11:01 UTC (permalink / raw)
  To: YueHaibing
  Cc: Will Deacon, Jens Axboe, Omar Sandoval, Hannes Reinecke,
	Linux Kernel Mailing List, kernel-janitors

On Thu, 11 Apr 2019 at 04:48, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_issue_cmd':
> drivers/memstick/host/jmb38x_ms.c:371:17: warning:
>  variable 'data' set but not used [-Wunused-but-set-variable]
>
> It's never used since introduction and can be removed.
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied for next (to my mmc tree), thanks!

Next time, please post to linux-mmc as well.

Kind regards
Uffe


> ---
>  drivers/memstick/host/jmb38x_ms.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
> index e3a5af65dbce..acec09813419 100644
> --- a/drivers/memstick/host/jmb38x_ms.c
> +++ b/drivers/memstick/host/jmb38x_ms.c
> @@ -368,7 +368,6 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
>  static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
>  {
>         struct jmb38x_ms_host *host = memstick_priv(msh);
> -       unsigned char *data;
>         unsigned int data_len, cmd, t_val;
>
>         if (!(STATUS_HAS_MEDIA & readl(host->addr + STATUS))) {
> @@ -400,8 +399,6 @@ static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
>                         cmd |= TPC_WAIT_INT;
>         }
>
> -       data = host->req->data;
> -
>         if (!no_dma)
>                 host->cmd_flags |= DMA_DATA;
>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] memstick: remove set but not used variable 'data'
  2019-04-11 11:01 ` Ulf Hansson
@ 2019-04-11 12:23   ` YueHaibing
  0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2019-04-11 12:23 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Will Deacon, Jens Axboe, Omar Sandoval, Hannes Reinecke,
	Linux Kernel Mailing List, kernel-janitors

On 2019/4/11 19:01, Ulf Hansson wrote:
> On Thu, 11 Apr 2019 at 04:48, YueHaibing <yuehaibing@huawei.com> wrote:
>>
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_issue_cmd':
>> drivers/memstick/host/jmb38x_ms.c:371:17: warning:
>>  variable 'data' set but not used [-Wunused-but-set-variable]
>>
>> It's never used since introduction and can be removed.
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Applied for next (to my mmc tree), thanks!
> 
> Next time, please post to linux-mmc as well.

Ok, Thanks!

> 
> Kind regards
> Uffe
> 
> 
>> ---
>>  drivers/memstick/host/jmb38x_ms.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
>> index e3a5af65dbce..acec09813419 100644
>> --- a/drivers/memstick/host/jmb38x_ms.c
>> +++ b/drivers/memstick/host/jmb38x_ms.c
>> @@ -368,7 +368,6 @@ static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host)
>>  static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
>>  {
>>         struct jmb38x_ms_host *host = memstick_priv(msh);
>> -       unsigned char *data;
>>         unsigned int data_len, cmd, t_val;
>>
>>         if (!(STATUS_HAS_MEDIA & readl(host->addr + STATUS))) {
>> @@ -400,8 +399,6 @@ static int jmb38x_ms_issue_cmd(struct memstick_host *msh)
>>                         cmd |= TPC_WAIT_INT;
>>         }
>>
>> -       data = host->req->data;
>> -
>>         if (!no_dma)
>>                 host->cmd_flags |= DMA_DATA;
>>
>>
>>
> 
> .
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-11 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11  2:59 [PATCH -next] memstick: remove set but not used variable 'data' YueHaibing
2019-04-11 11:01 ` Ulf Hansson
2019-04-11 12:23   ` YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).