From: Lee Jones <lee.jones@linaro.org>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mfd: sta2x11-mfd: use named constants for pci_power_t values
Date: Mon, 6 Jan 2014 11:01:45 +0000 [thread overview]
Message-ID: <20140106110145.GM23772@lee--X1> (raw)
In-Reply-To: <1388706031-22180-2-git-send-email-Julia.Lawall@lip6.fr>
On Fri, 03 Jan 2014, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression pdev;
> @@
>
> pci_set_power_state(pdev,
> - 0
> + PCI_D0
> )
> // </smpl>
I'm happy with the code and that you used Coccinelle to discover the
issue, but I feel a little more explanation would be helpful to
readers.
Why is (pci_power_t __force) 0 better than 0?
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/mfd/sta2x11-mfd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c
> index 0d42e40..5b72db0 100644
> --- a/drivers/mfd/sta2x11-mfd.c
> +++ b/drivers/mfd/sta2x11-mfd.c
> @@ -529,7 +529,7 @@ static int sta2x11_mfd_resume(struct pci_dev *pdev)
> {
> int err;
>
> - pci_set_power_state(pdev, 0);
> + pci_set_power_state(pdev, PCI_D0);
> err = pci_enable_device(pdev);
> if (err)
> return err;
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2014-01-06 11:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-02 23:40 [PATCH 0/3] use named constants for pci_power_t values Julia Lawall
2014-01-02 23:40 ` [PATCH 1/3] mfd: sta2x11-mfd: " Julia Lawall
2014-01-06 11:01 ` Lee Jones [this message]
2014-01-06 11:17 ` Julia Lawall
2014-01-06 11:49 ` Lee Jones
2014-01-02 23:40 ` [PATCH 2/3] ALSA: cs5535audio: " Julia Lawall
2014-01-05 10:44 ` Takashi Iwai
2014-01-02 23:40 ` [PATCH 3/3] smsc9420: " Julia Lawall
2014-01-04 0:59 ` David Miller
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=20140106110145.GM23772@lee--X1 \
--to=lee.jones@linaro.org \
--cc=Julia.Lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox