All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: nick <xerofoify@gmail.com>,
	linux-pci@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Len Brown" <lenb@kernel.org>
Subject: Re: [Intel-gfx] 3.19-rc1 errors when opening LID
Date: Sat, 27 Dec 2014 12:17:58 -0800	[thread overview]
Message-ID: <1419711478.20894.5.camel@perches.com> (raw)
In-Reply-To: <1818900.MY9q0yfluC@vostro.rjw.lan>

On Sat, 2014-12-27 at 21:22 +0100, Rafael J. Wysocki wrote:
[]
> +++ linux-pm/include/acpi/acpi_bus.h
> @@ -589,7 +589,8 @@ static inline u32 acpi_target_system_sta
>  
>  static inline bool acpi_device_power_manageable(struct acpi_device *adev)
>  {
> -	return adev->flags.power_manageable;
> +	return adev->flags.power_manageable
> +		&& (adev->status.present || adev->status.functional);

Most code in the kernel has these logical
continuations at the end of the previous line.

> +++ linux-pm/drivers/acpi/device_pm.c
[]
> @@ -361,7 +362,7 @@ bool acpi_bus_power_manageable(acpi_hand
>  	int result;
>  
>  	result = acpi_bus_get_device(handle, &device);
> -	return result ? false : device->flags.power_manageable;
> +	return result ? false : acpi_device_power_manageable(device);

This might read better as:

	if (acpi_bus_get_device(handle, &device))
		return false;

	return acpi_device_power_manageable(device);


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: "Pali Rohár" <pali.rohar@gmail.com>, nick <xerofoify@gmail.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"David Airlie" <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, "Len Brown" <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, "Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Subject: Re: [Intel-gfx] 3.19-rc1 errors when opening LID
Date: Sat, 27 Dec 2014 12:17:58 -0800	[thread overview]
Message-ID: <1419711478.20894.5.camel@perches.com> (raw)
In-Reply-To: <1818900.MY9q0yfluC@vostro.rjw.lan>

On Sat, 2014-12-27 at 21:22 +0100, Rafael J. Wysocki wrote:
[]
> +++ linux-pm/include/acpi/acpi_bus.h
> @@ -589,7 +589,8 @@ static inline u32 acpi_target_system_sta
>  
>  static inline bool acpi_device_power_manageable(struct acpi_device *adev)
>  {
> -	return adev->flags.power_manageable;
> +	return adev->flags.power_manageable
> +		&& (adev->status.present || adev->status.functional);

Most code in the kernel has these logical
continuations at the end of the previous line.

> +++ linux-pm/drivers/acpi/device_pm.c
[]
> @@ -361,7 +362,7 @@ bool acpi_bus_power_manageable(acpi_hand
>  	int result;
>  
>  	result = acpi_bus_get_device(handle, &device);
> -	return result ? false : device->flags.power_manageable;
> +	return result ? false : acpi_device_power_manageable(device);

This might read better as:

	if (acpi_bus_get_device(handle, &device))
		return false;

	return acpi_device_power_manageable(device);



  reply	other threads:[~2014-12-27 20:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24 18:51 3.19-rc1 errors when opening LID Pali Rohár
2014-12-24 18:51 ` Pali Rohár
2014-12-25  4:28 ` nick
2014-12-25  8:48   ` Pali Rohár
2014-12-25  8:48     ` [Intel-gfx] " Pali Rohár
2014-12-25 16:59     ` nick
2014-12-27  8:19       ` Pali Rohár
2014-12-27  8:19         ` [Intel-gfx] " Pali Rohár
2014-12-27 17:31         ` nick
2014-12-27 20:22         ` Rafael J. Wysocki
2014-12-27 20:22           ` [Intel-gfx] " Rafael J. Wysocki
2014-12-27 20:17           ` Joe Perches [this message]
2014-12-27 20:17             ` Joe Perches
2015-04-06 10:02           ` 4.0-rc6 " Pali Rohár
2014-12-26 15:12 ` 3.19-rc1 " Rafael J. Wysocki
2014-12-26 15:12   ` Rafael J. Wysocki
2014-12-26 15:52   ` Pali Rohár
2014-12-26 15:52     ` Pali Rohár

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=1419711478.20894.5.camel@perches.com \
    --to=joe@perches.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pali.rohar@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=xerofoify@gmail.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 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.