All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] usb: acpi: Switch to use acpi_evaluate_dsm_typed()
Date: Thu, 19 Jan 2023 14:11:15 +0100	[thread overview]
Message-ID: <Y8lBczJAXR4Hjl93@kroah.com> (raw)
In-Reply-To: <20230118080419.20880-1-andriy.shevchenko@linux.intel.com>

On Wed, Jan 18, 2023 at 10:04:19AM +0200, Andy Shevchenko wrote:
> The acpi_evaluate_dsm_typed() provides a way to check the type of the
> object evaluated by _DSM call. Use it instead of open coded variant.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/usb/core/usb-acpi.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
> index 533baa85083c..a34b22537d7c 100644
> --- a/drivers/usb/core/usb-acpi.c
> +++ b/drivers/usb/core/usb-acpi.c
> @@ -81,15 +81,11 @@ int usb_acpi_port_lpm_incapable(struct usb_device *hdev, int index)
>  		return -ENODEV;
>  	}
>  
> -	obj = acpi_evaluate_dsm(port_handle, &guid, 0,
> -				USB_DSM_DISABLE_U1_U2_FOR_PORT, NULL);
> -
> -	if (!obj)
> -		return -ENODEV;
> -
> -	if (obj->type != ACPI_TYPE_INTEGER) {
> +	obj = acpi_evaluate_dsm_typed(port_handle, &guid, 0,
> +				      USB_DSM_DISABLE_U1_U2_FOR_PORT, NULL,
> +				      ACPI_TYPE_INTEGER);
> +	if (!obj) {
>  		dev_dbg(&hdev->dev, "evaluate port-%d _DSM failed\n", port1);
> -		ACPI_FREE(obj);
>  		return -EINVAL;
>  	}
>  
> -- 
> 2.39.0
> 

Fails to apply to my tree :(

  reply	other threads:[~2023-01-19 13:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18  8:04 [PATCH v1 1/1] usb: acpi: Switch to use acpi_evaluate_dsm_typed() Andy Shevchenko
2023-01-19 13:11 ` Greg Kroah-Hartman [this message]
2023-01-19 14:37   ` Andy Shevchenko
2023-01-19 15:14     ` Greg Kroah-Hartman
2023-01-19 15:17       ` Andy Shevchenko

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=Y8lBczJAXR4Hjl93@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.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 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.