Commit 098c408b authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Ulf Hansson

mmc: sdhci-of-arasan: Remove uninitialized ret variables

Clang warns:

drivers/mmc/host/sdhci-of-arasan.c:784:9: warning: variable 'ret' is
uninitialized when used here [-Wuninitialized]
        return ret;
               ^~~
drivers/mmc/host/sdhci-of-arasan.c:738:9: note: initialize the variable
'ret' to silence this warning
        int ret;
               ^
                = 0
drivers/mmc/host/sdhci-of-arasan.c:860:9: warning: variable 'ret' is
uninitialized when used here [-Wuninitialized]
        return ret;
               ^~~
drivers/mmc/host/sdhci-of-arasan.c:810:9: note: initialize the variable
'ret' to silence this warning
        int ret;
               ^
                = 0
2 warnings generated.

This looks like a copy paste error. Neither function has handling that
needs ret so just remove it and return 0 directly.

Link: https://github.com/ClangBuiltLinux/linux/issues/996Reported-by: default avatarkernelci.org bot <bot@kernelci.org>
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20200416182402.16858-1-natechancellor@gmail.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent bcf89cb8
...@@ -735,7 +735,6 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -735,7 +735,6 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
container_of(clk_data, struct sdhci_arasan_data, clk_data); container_of(clk_data, struct sdhci_arasan_data, clk_data);
struct sdhci_host *host = sdhci_arasan->host; struct sdhci_host *host = sdhci_arasan->host;
u8 tap_delay, tap_max = 0; u8 tap_delay, tap_max = 0;
int ret;
/* /*
* This is applicable for SDHCI_SPEC_300 and above * This is applicable for SDHCI_SPEC_300 and above
...@@ -781,7 +780,7 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -781,7 +780,7 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER); sdhci_writel(host, regval, SDHCI_ARASAN_OTAPDLY_REGISTER);
} }
return ret; return 0;
} }
static const struct clk_ops versal_sdcardclk_ops = { static const struct clk_ops versal_sdcardclk_ops = {
...@@ -807,7 +806,6 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -807,7 +806,6 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
container_of(clk_data, struct sdhci_arasan_data, clk_data); container_of(clk_data, struct sdhci_arasan_data, clk_data);
struct sdhci_host *host = sdhci_arasan->host; struct sdhci_host *host = sdhci_arasan->host;
u8 tap_delay, tap_max = 0; u8 tap_delay, tap_max = 0;
int ret;
/* /*
* This is applicable for SDHCI_SPEC_300 and above * This is applicable for SDHCI_SPEC_300 and above
...@@ -857,7 +855,7 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees) ...@@ -857,7 +855,7 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
sdhci_writel(host, regval, SDHCI_ARASAN_ITAPDLY_REGISTER); sdhci_writel(host, regval, SDHCI_ARASAN_ITAPDLY_REGISTER);
} }
return ret; return 0;
} }
static const struct clk_ops versal_sampleclk_ops = { static const struct clk_ops versal_sampleclk_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment