All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: rjw@rjwysocki.net, lenb@kernel.org, linux-pm@vger.kernel.org,
	mario.limonciello@dell.com, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI / Sleep: Check low power idle constraints for debug only
Date: Tue, 08 Aug 2017 09:08:42 -0700	[thread overview]
Message-ID: <1502208522.61234.1.camel@linux.intel.com> (raw)
In-Reply-To: <20170808075120.GA9258@wunner.de>

On Tue, 2017-08-08 at 09:51 +0200, Lukas Wunner wrote:
> On Mon, Aug 07, 2017 at 04:53:57PM -0700, Srinivas Pandruvada wrote:
> > 
> > +	out_obj = acpi_evaluate_dsm(lps0_device_handle,
> > &lps0_dsm_guid,
> > +				    1,
> > ACPI_LPS0_GET_DEVICE_CONSTRAINTS,
> > +				    NULL);
> > +
> > +	acpi_handle_debug(lps0_device_handle, "_DSM function 1
> > eval %s\n",
> > +			  out_obj ? "successful" : "failed");
> > +
> > +	if (!out_obj)
> > +		return;
> > +
> > +	if (out_obj->type != ACPI_TYPE_PACKAGE)
> > +		goto free_acpi_buffer;
> 
> Using acpi_evaluate_dsm_typed() would avoid having to check the type
> here.
> 
> 
> > 
> > +	for (i = 0; i < out_obj->package.count; i++) {
> > +		union acpi_object *package = &out_obj-
> > >package.elements[i];
> > +		struct lpi_device_info info;
> > +		int package_count = 0, j;
> > +
> > +		if (!package)
> > +			continue;
> > +
> > +		info.enabled = 0;
> > +		info.package = NULL;
> > +		info.name = NULL;
> 
> Using a declaration such as
> 
> 		struct lpi_device_info info = { };
> 
> would avoid having to zero the struct elements here.
Thanks for the review. I will send update including these.

Thanks,
Srinivas

> 
> 
> Thanks,
> 
> Lukas

      reply	other threads:[~2017-08-08 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07 23:53 [PATCH] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada
2017-08-08  7:51 ` Lukas Wunner
2017-08-08 16:08   ` Srinivas Pandruvada [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=1502208522.61234.1.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mario.limonciello@dell.com \
    --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.