diff mbox

mmc: dw_mmc: Remove prev_state and state assignment for STATE_SENDING_CMD

Message ID 1519352596-138530-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shawn Lin Feb. 23, 2018, 2:23 a.m. UTC
Clang reports a compile warning:
drivers/mmc/host/dw_mmc.c:2124:5: warning: Value stored to 'prev_state'
is never read

By checking the code, prev_state and state assignment for
STATE_SENDING_CMD is indeed never used after jumping to unlock tag.
So remove it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/mmc/host/dw_mmc.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jaehoon Chung Feb. 23, 2018, 6:31 a.m. UTC | #1
On 02/23/2018 11:23 AM, Shawn Lin wrote:
> Clang reports a compile warning:
> drivers/mmc/host/dw_mmc.c:2124:5: warning: Value stored to 'prev_state'
> is never read
> 
> By checking the code, prev_state and state assignment for
> STATE_SENDING_CMD is indeed never used after jumping to unlock tag.
> So remove it.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Will apply yours. Thanks!

Best Regards,
Jaehoon Chung

> ---
> 
>  drivers/mmc/host/dw_mmc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 0aa3997..5d5d026 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2021,7 +2021,6 @@ static void dw_mci_tasklet_func(unsigned long priv)
>  			set_bit(EVENT_CMD_COMPLETE, &host->completed_events);
>  			err = dw_mci_command_complete(host, cmd);
>  			if (cmd == mrq->sbc && !err) {
> -				prev_state = state = STATE_SENDING_CMD;
>  				__dw_mci_start_request(host, host->slot,
>  						       mrq->cmd);
>  				goto unlock;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Feb. 27, 2018, 11:27 a.m. UTC | #2
On 23 February 2018 at 07:31, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>
>
> On 02/23/2018 11:23 AM, Shawn Lin wrote:
>> Clang reports a compile warning:
>> drivers/mmc/host/dw_mmc.c:2124:5: warning: Value stored to 'prev_state'
>> is never read
>>
>> By checking the code, prev_state and state assignment for
>> STATE_SENDING_CMD is indeed never used after jumping to unlock tag.
>> So remove it.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>
> Will apply yours. Thanks!

Dear Jaehoon, I pick this up. I consider the above as your ack and add
your tag for it.

Please tell me if you have any objections to that.

[...]

Thanks and kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jaehoon Chung Feb. 27, 2018, 11:37 a.m. UTC | #3
On 02/27/2018 08:27 PM, Ulf Hansson wrote:
> On 23 February 2018 at 07:31, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>
>>
>> On 02/23/2018 11:23 AM, Shawn Lin wrote:
>>> Clang reports a compile warning:
>>> drivers/mmc/host/dw_mmc.c:2124:5: warning: Value stored to 'prev_state'
>>> is never read
>>>
>>> By checking the code, prev_state and state assignment for
>>> STATE_SENDING_CMD is indeed never used after jumping to unlock tag.
>>> So remove it.
>>>
>>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> Will apply yours. Thanks!
> 
> Dear Jaehoon, I pick this up. I consider the above as your ack and add
> your tag for it.
> 
> Please tell me if you have any objections to that.

Sure, No problem

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> 
> [...]
> 
> Thanks and kind regards
> Uffe
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 0aa3997..5d5d026 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2021,7 +2021,6 @@  static void dw_mci_tasklet_func(unsigned long priv)
 			set_bit(EVENT_CMD_COMPLETE, &host->completed_events);
 			err = dw_mci_command_complete(host, cmd);
 			if (cmd == mrq->sbc && !err) {
-				prev_state = state = STATE_SENDING_CMD;
 				__dw_mci_start_request(host, host->slot,
 						       mrq->cmd);
 				goto unlock;