public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Yijing Wang <wangyijing@huawei.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Hanjun Guo <guohanjun@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH v4] ACPI: Fix acpi_evaluate_object() return value check
Date: Thu, 23 Jan 2014 10:19:53 +0800	[thread overview]
Message-ID: <52E07C49.9070509@huawei.com> (raw)
In-Reply-To: <CAErSpo4_VCVHcq2cs_HP-_0kFSnUWsxsr6Y1iiR==3XLNaVc2w@mail.gmail.com>

On 2014/1/23 5:37, Bjorn Helgaas wrote:
> On Mon, Jan 20, 2014 at 7:46 PM, Yijing Wang <wangyijing@huawei.com> wrote:
>> Since acpi_evaluate_object() returns acpi_status and not plain int,
>> ACPI_FAILURE() should be used for checking its return value.
>>
>> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
>> ---
>> v3->v4: Fix spell error, add Jani Nikula reviewed-by.
>> v2->v3: Fix compile error pointed out by Hanjun.
>> v1->v2: Add CC to related subsystem MAINTAINERS
>> ---
>>  drivers/gpu/drm/i915/intel_acpi.c              |   24 ++++++++++++++----------
>>  drivers/gpu/drm/nouveau/core/subdev/mxm/base.c |    9 +++++----
>>  drivers/gpu/drm/nouveau/nouveau_acpi.c         |   23 +++++++++++++----------
>>  drivers/pci/pci-label.c                        |    9 ++++++---
> 
> For the drivers/pci/pci-label.c part,
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Thanks.

> 
>> +       status = acpi_evaluate_object(handle, "_DSM", &input, &output);
>> +       if (ACPI_FAILURE(status)) {
>> +               DRM_DEBUG_DRIVER("failed to evaluate _DSM: %s\n",
>> +                               acpi_format_exception(status));
> 
> It's too bad there isn't an easy way to produce more informative error
> messages, e.g., by including a namespace path or something.  A message
> like:
> 
>     failed to evaluate _DSM: A requested entity is not found
> 
> is only useful if there's enough context to figure out what's going on.

Yes, I will add the namespace path into the debug info, thanks!

> 
> Bjorn
> 
> .
> 


-- 
Thanks!
Yijing

      reply	other threads:[~2014-01-23  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21  2:46 [PATCH v4] ACPI: Fix acpi_evaluate_object() return value check Yijing Wang
2014-01-22 21:37 ` Bjorn Helgaas
2014-01-23  2:19   ` Yijing Wang [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=52E07C49.9070509@huawei.com \
    --to=wangyijing@huawei.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=guohanjun@huawei.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rafael.j.wysocki@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