lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <892a121b-dbfe-fdbc-f58d-08b9789ccaf8@intel.com>
Date:   Fri, 8 Oct 2021 12:45:48 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Eric Biggers <ebiggers@...gle.com>,
        Raul E Rangel <rrangel@...omium.org>,
        linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org
Subject: Re: [PATCH v1 6/6] mmc: sdhci-pci: Remove dead code (rst_n_gpio et
 al)

On 05/10/2021 13:24, Andy Shevchenko wrote:
> There is no user of this member. Remove the dead code for good.

So this is dependent on patch 5 i.e. that patch removed the
references to the code being removed in this patch.  Please
make a note of that in the commit message.


> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/mmc/host/sdhci-pci-core.c | 27 ---------------------------
>  drivers/mmc/host/sdhci-pci.h      |  2 --
>  2 files changed, 29 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index a4279437bb5f..6c284e07675e 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -1900,21 +1900,6 @@ int sdhci_pci_enable_dma(struct sdhci_host *host)
>  	return 0;
>  }
>  
> -static void sdhci_pci_gpio_hw_reset(struct sdhci_host *host)
> -{
> -	struct sdhci_pci_slot *slot = sdhci_priv(host);
> -	int rst_n_gpio = slot->rst_n_gpio;
> -
> -	if (!gpio_is_valid(rst_n_gpio))
> -		return;
> -	gpio_set_value_cansleep(rst_n_gpio, 0);
> -	/* For eMMC, minimum is 1us but give it 10us for good measure */
> -	udelay(10);
> -	gpio_set_value_cansleep(rst_n_gpio, 1);
> -	/* For eMMC, minimum is 200us but give it 300us for good measure */
> -	usleep_range(300, 1000);
> -}
> -
>  static void sdhci_pci_hw_reset(struct sdhci_host *host)
>  {
>  	struct sdhci_pci_slot *slot = sdhci_priv(host);
> @@ -2045,7 +2030,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
>  
>  	slot->chip = chip;
>  	slot->host = host;
> -	slot->rst_n_gpio = -EINVAL;
>  	slot->cd_idx = -1;
>  
>  	host->hw_name = "PCI";
> @@ -2071,17 +2055,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
>  			goto cleanup;
>  	}
>  
> -	if (gpio_is_valid(slot->rst_n_gpio)) {
> -		if (!devm_gpio_request(&pdev->dev, slot->rst_n_gpio, "eMMC_reset")) {
> -			gpio_direction_output(slot->rst_n_gpio, 1);
> -			slot->host->mmc->caps |= MMC_CAP_HW_RESET;
> -			slot->hw_reset = sdhci_pci_gpio_hw_reset;
> -		} else {
> -			dev_warn(&pdev->dev, "failed to request rst_n_gpio\n");
> -			slot->rst_n_gpio = -EINVAL;
> -		}
> -	}
> -
>  	host->mmc->pm_caps = MMC_PM_KEEP_POWER;
>  	host->mmc->slotno = slotno;
>  	host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
> diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h
> index 8bb3b9c78589..5e3193278ff9 100644
> --- a/drivers/mmc/host/sdhci-pci.h
> +++ b/drivers/mmc/host/sdhci-pci.h
> @@ -157,8 +157,6 @@ struct sdhci_pci_slot {
>  	struct sdhci_pci_chip	*chip;
>  	struct sdhci_host	*host;
>  
> -	int			rst_n_gpio;
> -
>  	int			cd_idx;
>  	bool			cd_override_level;
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ