All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check
@ 2017-07-16 21:16 Fabio Estevam
  2017-07-17  7:07 ` Thomas Petazzoni
  2017-08-02 21:43 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2017-07-16 21:16 UTC (permalink / raw)
  To: bhelgaas; +Cc: thomas.petazzoni, jason, linux-pci, Fabio Estevam

From: Fabio Estevam <fabio.estevam@nxp.com>

The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
 drivers/pci/host/pci-mvebu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index f353a6e..fa227d8 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -1186,8 +1186,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)
  */
 static void mvebu_pcie_powerdown(struct mvebu_pcie_port *port)
 {
-	if (port->reset_gpio)
-		gpiod_set_value_cansleep(port->reset_gpio, 1);
+	gpiod_set_value_cansleep(port->reset_gpio, 1);
 
 	clk_disable_unprepare(port->clk);
 }
-- 
2.7.4

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

* Re: [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check
  2017-07-16 21:16 [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check Fabio Estevam
@ 2017-07-17  7:07 ` Thomas Petazzoni
  2017-08-02 21:43 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2017-07-17  7:07 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: bhelgaas, jason, linux-pci, Fabio Estevam

Hello,

On Sun, 16 Jul 2017 18:16:13 -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> The gpiod API checks for NULL descriptors, so there is no need to
> duplicate the check in the driver.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
>  drivers/pci/host/pci-mvebu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check
  2017-07-16 21:16 [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check Fabio Estevam
  2017-07-17  7:07 ` Thomas Petazzoni
@ 2017-08-02 21:43 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2017-08-02 21:43 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: bhelgaas, thomas.petazzoni, jason, linux-pci, Fabio Estevam

On Sun, Jul 16, 2017 at 06:16:13PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> The gpiod API checks for NULL descriptors, so there is no need to
> duplicate the check in the driver.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Applied with Thomas' ack to pci/host-mvebu for v4.14, thanks!

> ---
>  drivers/pci/host/pci-mvebu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
> index f353a6e..fa227d8 100644
> --- a/drivers/pci/host/pci-mvebu.c
> +++ b/drivers/pci/host/pci-mvebu.c
> @@ -1186,8 +1186,7 @@ static int mvebu_pcie_powerup(struct mvebu_pcie_port *port)
>   */
>  static void mvebu_pcie_powerdown(struct mvebu_pcie_port *port)
>  {
> -	if (port->reset_gpio)
> -		gpiod_set_value_cansleep(port->reset_gpio, 1);
> +	gpiod_set_value_cansleep(port->reset_gpio, 1);
>  
>  	clk_disable_unprepare(port->clk);
>  }
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2017-08-02 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-16 21:16 [PATCH] PCI: mvebu: Remove unneeded gpiod NULL check Fabio Estevam
2017-07-17  7:07 ` Thomas Petazzoni
2017-08-02 21:43 ` Bjorn Helgaas

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.