Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] mmc: sdhci-pci: Switch to use acpi_evaluate_dsm_typed()
Date: Mon, 9 Oct 2023 19:15:36 +0300	[thread overview]
Message-ID: <2118f573-0760-4dae-ab63-ff2768c7b437@intel.com> (raw)
In-Reply-To: <20231002135103.2602847-1-andriy.shevchenko@linux.intel.com>

On 2/10/23 16:51, 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>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-pci-core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 7c14feb5db77..025b31aa712c 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -483,11 +483,12 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  	int err = 0;
>  	size_t len;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
> +	obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL,
> +				      ACPI_TYPE_BUFFER);
>  	if (!obj)
>  		return -EOPNOTSUPP;
>  
> -	if (obj->type != ACPI_TYPE_BUFFER || obj->buffer.length < 1) {
> +	if (obj->buffer.length < 1) {
>  		err = -EINVAL;
>  		goto out;
>  	}


  reply	other threads:[~2023-10-09 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 13:51 [PATCH v1 1/1] mmc: sdhci-pci: Switch to use acpi_evaluate_dsm_typed() Andy Shevchenko
2023-10-09 16:15 ` Adrian Hunter [this message]
2023-10-10 14:27 ` Ulf Hansson

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=2118f573-0760-4dae-ab63-ff2768c7b437@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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