All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Yinghai Lu <yinghai@kernel.org>, Jiang Liu <jiang.liu@huawei.com>,
	Gu Zheng <guz.fnst@cn.fujitsu.com>,
	Toshi Kani <toshi.kani@hp.com>,
	Myron Stowe <myron.stowe@redhat.com>,
	Yijing Wang <wangyijing@huawei.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Len Brown <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] ACPI, pci_root: use acpi_handle_print() and pr_xxx() to print messages
Date: Fri, 31 May 2013 13:18:26 -0600	[thread overview]
Message-ID: <CAErSpo5mtYxWkVn+DTT4Sswp0RkWBM=prhtViMJ+KoLpOMY1hw@mail.gmail.com> (raw)
In-Reply-To: <51A8CDC7.2050508@gmail.com>

On Fri, May 31, 2013 at 10:20 AM, Jiang Liu <liuj97@gmail.com> wrote:
> On Fri 31 May 2013 03:51:51 AM CST, Rafael J. Wysocki wrote:
>> On Thursday, May 30, 2013 11:33:56 AM Bjorn Helgaas wrote:
>>> On Tue, May 14, 2013 at 09:00:39PM +0800, Jiang Liu wrote:
>>>> Use acpi_handle_print() and pr_xxx() to print messages in pci_root.c.
>>>>
>>>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>>>> Cc: Len Brown <lenb@kernel.org>
>>>> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
>>>> Cc: linux-acpi@vger.kernel.org
>>>> Cc: linux-kernel@vger.kernel.org
>>>> ---
>>>>  drivers/acpi/pci_root.c | 70 ++++++++++++++++++++++---------------------------
>>>>  1 file changed, 32 insertions(+), 38 deletions(-)
>>>>
>>>> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
>>>> index 91ddfd6..21dda5a 100644
>>>> --- a/drivers/acpi/pci_root.c
>>>> +++ b/drivers/acpi/pci_root.c
>>>> @@ -379,23 +379,24 @@ static int acpi_pci_root_add(struct acpi_device *device,
>>>>     struct acpi_pci_root *root;
>>>>     u32 flags, base_flags;
>>>>     bool is_osc_granted = false;
>>>> +   acpi_handle handle = device->handle;
>>>>
>>>>     root = kzalloc(sizeof(struct acpi_pci_root), GFP_KERNEL);
>>>>     if (!root)
>>>>             return -ENOMEM;
>>>>
>>>>     segment = 0;
>>>> -   status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL,
>>>> +   status = acpi_evaluate_integer(handle, METHOD_NAME__SEG, NULL,
>>>>                                    &segment);
>>>>     if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
>>>> -           printk(KERN_ERR PREFIX "can't evaluate _SEG\n");
>>>> +           acpi_handle_err(handle, "can't evaluate _SEG\n");
>>>
>>> I previously acked this, but I noticed that we are making a mix of
>>> dev_printk() and acpi_handle_printk() here.  The difference is like this:
>>>
>>>   acpi PNP0A08:00: ACPI _OSC support notification failed, disabling PCIe ASPM
>>>   ACPI: \_SB_.PCI0: ACPI _OSC support notification failed, disabling PCIe ASPM
>>>
>>> I'm not sure which direction we should go here, but I think we should
>>> choose one or the other and use it consistently.  Personally, I think the
>>> internal DSDT names should be available *somewhere*, but not necessarily
>>> used in run-of-the-mill chit-chat.  For that reason, I prefer
>>> dev_printk(), though I have the feeling that Rafael is moving toward
>>> eliminating the struct acpi_device, so he might prefer
>>> acpi_handle_printk().
>>
>> I really don't care that much, but I agree that they should be used
>> consistently.
> Hi Bjorn and Rafael,
>      I will work on this tomorrow. In some cases, only handle is
> available, so we
> could only use acpi_handle_printk(). So I think the directly may be:
> use dev_printk()
> if possible, otherwise use acpi_handle_printk() instead. Is that the
> right way to go?

That sounds good to me.

Bjorn

  reply	other threads:[~2013-05-31 19:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14 13:00 [PATCH v1 1/2] ACPI, PCI: remove unused global list acpi_pci_roots in pci_root.c Jiang Liu
2013-05-14 13:00 ` [PATCH v1 2/2] ACPI, pci_root: use acpi_handle_print() and pr_xxx() to print messages Jiang Liu
2013-05-30 17:33   ` Bjorn Helgaas
2013-05-30 19:51     ` Rafael J. Wysocki
2013-05-31 16:20       ` Jiang Liu
2013-05-31 19:18         ` Bjorn Helgaas [this message]
2013-06-03 13:16           ` [PATCH] PCI, ACPI: use dev_printk() to keep messages consistent Jiang Liu
2013-06-03 21:09             ` Bjorn Helgaas
2013-05-28 22:37 ` [PATCH v1 1/2] ACPI, PCI: remove unused global list acpi_pci_roots in pci_root.c Bjorn Helgaas
2013-05-28 23:21   ` Rafael J. Wysocki
2013-05-28 23:48     ` Rafael J. Wysocki

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='CAErSpo5mtYxWkVn+DTT4Sswp0RkWBM=prhtViMJ+KoLpOMY1hw@mail.gmail.com' \
    --to=bhelgaas@google.com \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=jiang.liu@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=myron.stowe@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=toshi.kani@hp.com \
    --cc=wangyijing@huawei.com \
    --cc=yinghai@kernel.org \
    /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.