diff mbox

mmc: sdhci-acpi: remove unused struct sdhci_host variable

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

Commit Message

Shawn Lin July 21, 2017, 1:19 a.m. UTC
It was never used and introduce a warning

drivers/mmc/host/sdhci-acpi.c: In function 'sdhci_acpi_sdio_probe_slot':
drivers/mmc/host/sdhci-acpi.c:297:21: warning: variable 'host' set but
not used [-Wunused-but-set-variable]

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

 drivers/mmc/host/sdhci-acpi.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Adrian Hunter July 21, 2017, 8:48 a.m. UTC | #1
On 21/07/17 04:19, Shawn Lin wrote:
> It was never used and introduce a warning
> 
> drivers/mmc/host/sdhci-acpi.c: In function 'sdhci_acpi_sdio_probe_slot':
> drivers/mmc/host/sdhci-acpi.c:297:21: warning: variable 'host' set but
> not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
> 
>  drivers/mmc/host/sdhci-acpi.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index ac678e9..2b1df88 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -294,13 +294,10 @@ static int sdhci_acpi_sdio_probe_slot(struct platform_device *pdev,
>  				      const char *hid, const char *uid)
>  {
>  	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
> -	struct sdhci_host *host;
>  
>  	if (!c || !c->host)
>  		return 0;
>  
> -	host = c->host;
> -
>  	/* Platform specific code during sdio probe slot goes here */
>  
>  	return 0;
> 

--
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 July 27, 2017, 2:48 p.m. UTC | #2
On 21 July 2017 at 03:19, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> It was never used and introduce a warning
>
> drivers/mmc/host/sdhci-acpi.c: In function 'sdhci_acpi_sdio_probe_slot':
> drivers/mmc/host/sdhci-acpi.c:297:21: warning: variable 'host' set but
> not used [-Wunused-but-set-variable]
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>
>  drivers/mmc/host/sdhci-acpi.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index ac678e9..2b1df88 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -294,13 +294,10 @@ static int sdhci_acpi_sdio_probe_slot(struct platform_device *pdev,
>                                       const char *hid, const char *uid)
>  {
>         struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
> -       struct sdhci_host *host;
>
>         if (!c || !c->host)
>                 return 0;
>
> -       host = c->host;
> -
>         /* Platform specific code during sdio probe slot goes here */
>
>         return 0;
> --
> 1.9.1
>
>
> --
> 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/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index ac678e9..2b1df88 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -294,13 +294,10 @@  static int sdhci_acpi_sdio_probe_slot(struct platform_device *pdev,
 				      const char *hid, const char *uid)
 {
 	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
-	struct sdhci_host *host;
 
 	if (!c || !c->host)
 		return 0;
 
-	host = c->host;
-
 	/* Platform specific code during sdio probe slot goes here */
 
 	return 0;