Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706726

Re: [PATCH] ACPI / Sleep: Check low power idle constraints for debug only

From Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ACPI / Sleep: Check low power idle constraints for debug only
Date 2017-08-08 18:10 +0200
Message-ID <ucfeX-2nP-51@gated-at.bofh.it> (permalink)
References <uc06e-7Ai-23@gated-at.bofh.it> <uc7AK-4Sk-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] ACPI / Sleep: Check low power idle constraints for debug only Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-08-08 02:00 +0200
  Re: [PATCH] ACPI / Sleep: Check low power idle constraints for debug  only Lukas Wunner <lukas@wunner.de> - 2017-08-08 10:00 +0200
    Re: [PATCH] ACPI / Sleep: Check low power idle constraints for  debug only Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2017-08-08 18:10 +0200

csiph-web