lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 31 May 2013 13:18:26 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Jiang Liu <liuj97@...il.com>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>, Yinghai Lu <yinghai@...nel.org>,
	Jiang Liu <jiang.liu@...wei.com>,
	Gu Zheng <guz.fnst@...fujitsu.com>,
	Toshi Kani <toshi.kani@...com>,
	Myron Stowe <myron.stowe@...hat.com>,
	Yijing Wang <wangyijing@...wei.com>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Len Brown <lenb@...nel.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v1 2/2] ACPI, pci_root: use acpi_handle_print() and
 pr_xxx() to print messages

On Fri, May 31, 2013 at 10:20 AM, Jiang Liu <liuj97@...il.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@...wei.com>
>>>> Cc: Len Brown <lenb@...nel.org>
>>>> Cc: "Rafael J. Wysocki" <rjw@...k.pl>
>>>> Cc: linux-acpi@...r.kernel.org
>>>> Cc: linux-kernel@...r.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ