All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Bjorn Helgaas <helgaas@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] PCI: PM: Replace pci_dev_keep_suspended() with two functions
Date: Fri, 7 Jun 2019 14:20:21 +0300	[thread overview]
Message-ID: <20190607112021.GU2781@lahna.fi.intel.com> (raw)
In-Reply-To: <3991282.doQj0dWKJp@kreacher>

On Fri, Jun 07, 2019 at 12:32:31AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> The code in pci_dev_keep_suspended() is relatively hard to follow due
> to the negative checks in it and in its callers and the function has
> a possible side-effect (disabling the PME) which doesn't really match
> its role.
> 
> For this reason, move the PME disablig from pci_dev_keep_suspended()
                                ^^^^^^^^
disabling

> to a separate function and change the semantics (and name) of the
> rest of it, so that 'true' is returned when the device needs to be
> resumed (and not the other way around).  Change the callers of
> pci_dev_keep_suspended() accordingly.
> 
> While at it, make the code flow in pci_pm_poweroff() reflect the
> pci_pm_suspend() more closely to avoid arbitrary differences between
> them.
> 
> This is a cosmetic change with no intention to alter behavior.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

      reply	other threads:[~2019-06-07 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 22:28 [PATCH 0/2] PCI: PM: Optimization and cleanup Rafael J. Wysocki
2019-06-06 22:30 ` [PATCH v2 1/2] PCI: PM: Avoid resuming devices in D3hot during system suspend Rafael J. Wysocki
2019-06-07 11:17   ` Mika Westerberg
2019-06-06 22:32 ` [PATCH 2/2] PCI: PM: Replace pci_dev_keep_suspended() with two functions Rafael J. Wysocki
2019-06-07 11:20   ` Mika Westerberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190607112021.GU2781@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.