All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI/ASPM: Remove redundant check of pcie_set_clkpm
@ 2016-05-24  9:32 Shawn Lin
  2016-06-11  0:09 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2016-05-24  9:32 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Shawn Lin

Without supporting clock PM capable, if we want to disable
clkpm, we don't need this extra check as it already be zero for
the enable argument. And it's the same for enabling clkpm here.
So let's remove this check.

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

 drivers/pci/pcie/aspm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 2dfe7fd..0ec649d 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -139,7 +139,7 @@ static void pcie_set_clkpm_nocheck(struct pcie_link_state *link, int enable)
 static void pcie_set_clkpm(struct pcie_link_state *link, int enable)
 {
 	/* Don't enable Clock PM if the link is not Clock PM capable */
-	if (!link->clkpm_capable && enable)
+	if (!link->clkpm_capable)
 		enable = 0;
 	/* Need nothing if the specified equals to current state */
 	if (link->clkpm_enabled == enable)
-- 
2.3.7

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

* Re: [PATCH] PCI/ASPM: Remove redundant check of pcie_set_clkpm
  2016-05-24  9:32 [PATCH] PCI/ASPM: Remove redundant check of pcie_set_clkpm Shawn Lin
@ 2016-06-11  0:09 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2016-06-11  0:09 UTC (permalink / raw)
  To: Shawn Lin; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

On Tue, May 24, 2016 at 05:32:10PM +0800, Shawn Lin wrote:
> Without supporting clock PM capable, if we want to disable
> clkpm, we don't need this extra check as it already be zero for
> the enable argument. And it's the same for enabling clkpm here.
> So let's remove this check.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Applied to pci/aspm for v4.8, thanks, Shawn.

> ---
> 
>  drivers/pci/pcie/aspm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 2dfe7fd..0ec649d 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -139,7 +139,7 @@ static void pcie_set_clkpm_nocheck(struct pcie_link_state *link, int enable)
>  static void pcie_set_clkpm(struct pcie_link_state *link, int enable)
>  {
>  	/* Don't enable Clock PM if the link is not Clock PM capable */
> -	if (!link->clkpm_capable && enable)
> +	if (!link->clkpm_capable)
>  		enable = 0;
>  	/* Need nothing if the specified equals to current state */
>  	if (link->clkpm_enabled == enable)
> -- 
> 2.3.7
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-06-11  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24  9:32 [PATCH] PCI/ASPM: Remove redundant check of pcie_set_clkpm Shawn Lin
2016-06-11  0:09 ` 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.