All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sh_mmcif: remove redundant initialization of 'opc'
@ 2018-01-17 13:41 Colin King
  2018-01-18  8:33   ` Ulf Hansson
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2018-01-17 13:41 UTC (permalink / raw)
  To: Ulf Hansson, Linus Walleij, linux-mmc; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable opc is initialized with a value that is never read, opc
is later re-assigned a newer value, hence the initialization can
be removed.

Cleans up clang warning:
drivers/mmc/host/sh_mmcif.c:919:6: warning: Value stored to 'opc'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/mmc/host/sh_mmcif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 53fb18bb7bee..7bb00c68a756 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -916,7 +916,7 @@ static void sh_mmcif_start_cmd(struct sh_mmcif_host *host,
 			       struct mmc_request *mrq)
 {
 	struct mmc_command *cmd = mrq->cmd;
-	u32 opc = cmd->opcode;
+	u32 opc;
 	u32 mask = 0;
 	unsigned long flags;
 
-- 
2.15.1

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

* Re: [PATCH] mmc: sh_mmcif: remove redundant initialization of 'opc'
  2018-01-17 13:41 [PATCH] mmc: sh_mmcif: remove redundant initialization of 'opc' Colin King
@ 2018-01-18  8:33   ` Ulf Hansson
  0 siblings, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2018-01-18  8:33 UTC (permalink / raw)
  To: Colin King
  Cc: Linus Walleij, linux-mmc, kernel-janitors, Linux Kernel Mailing List

On 17 January 2018 at 14:41, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable opc is initialized with a value that is never read, opc
> is later re-assigned a newer value, hence the initialization can
> be removed.
>
> Cleans up clang warning:
> drivers/mmc/host/sh_mmcif.c:919:6: warning: Value stored to 'opc'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sh_mmcif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 53fb18bb7bee..7bb00c68a756 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -916,7 +916,7 @@ static void sh_mmcif_start_cmd(struct sh_mmcif_host *host,
>                                struct mmc_request *mrq)
>  {
>         struct mmc_command *cmd = mrq->cmd;
> -       u32 opc = cmd->opcode;
> +       u32 opc;
>         u32 mask = 0;
>         unsigned long flags;
>
> --
> 2.15.1
>

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

* Re: [PATCH] mmc: sh_mmcif: remove redundant initialization of 'opc'
@ 2018-01-18  8:33   ` Ulf Hansson
  0 siblings, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2018-01-18  8:33 UTC (permalink / raw)
  To: Colin King
  Cc: Linus Walleij, linux-mmc, kernel-janitors, Linux Kernel Mailing List

On 17 January 2018 at 14:41, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable opc is initialized with a value that is never read, opc
> is later re-assigned a newer value, hence the initialization can
> be removed.
>
> Cleans up clang warning:
> drivers/mmc/host/sh_mmcif.c:919:6: warning: Value stored to 'opc'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sh_mmcif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 53fb18bb7bee..7bb00c68a756 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -916,7 +916,7 @@ static void sh_mmcif_start_cmd(struct sh_mmcif_host *host,
>                                struct mmc_request *mrq)
>  {
>         struct mmc_command *cmd = mrq->cmd;
> -       u32 opc = cmd->opcode;
> +       u32 opc;
>         u32 mask = 0;
>         unsigned long flags;
>
> --
> 2.15.1
>

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

end of thread, other threads:[~2018-01-18  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 13:41 [PATCH] mmc: sh_mmcif: remove redundant initialization of 'opc' Colin King
2018-01-18  8:33 ` Ulf Hansson
2018-01-18  8:33   ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.