* [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed()
@ 2023-10-02 13:51 Andy Shevchenko
2023-10-02 18:44 ` Avri Altman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2023-10-02 13:51 UTC (permalink / raw)
To: Martin K. Petersen, Bart Van Assche, linux-scsi, linux-kernel
Cc: James E.J. Bottomley, Andy Shevchenko
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/ufs/host/ufshcd-pci.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
index 248a49e5e7f3..0aca666d2199 100644
--- a/drivers/ufs/host/ufshcd-pci.c
+++ b/drivers/ufs/host/ufshcd-pci.c
@@ -58,11 +58,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;
}
--
2.40.0.1.gaa8946217a0b
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed()
2023-10-02 13:51 [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed() Andy Shevchenko
@ 2023-10-02 18:44 ` Avri Altman
2023-10-10 1:47 ` Martin K. Petersen
2023-10-13 21:03 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Avri Altman @ 2023-10-02 18:44 UTC (permalink / raw)
To: Andy Shevchenko, Martin K. Petersen, Bart Van Assche,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: James E.J. Bottomley
> 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>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed()
2023-10-02 13:51 [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed() Andy Shevchenko
2023-10-02 18:44 ` Avri Altman
@ 2023-10-10 1:47 ` Martin K. Petersen
2023-10-13 21:03 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2023-10-10 1:47 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Martin K. Petersen, Bart Van Assche, linux-scsi, linux-kernel,
James E.J. Bottomley
Andy,
> 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.
Applied to 6.7/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed()
2023-10-02 13:51 [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed() Andy Shevchenko
2023-10-02 18:44 ` Avri Altman
2023-10-10 1:47 ` Martin K. Petersen
@ 2023-10-13 21:03 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2023-10-13 21:03 UTC (permalink / raw)
To: Bart Van Assche, linux-scsi, linux-kernel, Andy Shevchenko
Cc: Martin K . Petersen, James E.J. Bottomley
On Mon, 02 Oct 2023 16:51:25 +0300, 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.
>
>
Applied to 6.7/scsi-queue, thanks!
[1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed()
https://git.kernel.org/mkp/scsi/c/fcf3fb7bd50c
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-13 21:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 13:51 [PATCH v1 1/1] scsi: ufs: ufs-pci: Switch to use acpi_evaluate_dsm_typed() Andy Shevchenko
2023-10-02 18:44 ` Avri Altman
2023-10-10 1:47 ` Martin K. Petersen
2023-10-13 21:03 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox