[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o9v2jwec.fsf@linux.intel.com>
Date: Tue, 09 May 2017 10:56:43 +0300
From: Felipe Balbi <balbi@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-acpi@...r.kernel.org, tpmdd-devel@...ts.sourceforge.net,
intel-gfx@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
linux-input@...r.kernel.org, iommu@...ts.linux-foundation.org,
linux-mmc@...r.kernel.org, netdev@...r.kernel.org,
linux-pci@...r.kernel.org, linux-usb@...r.kernel.org,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Borislav Petkov <bp@...e.de>,
Dan Williams <dan.j.williams@...el.com>,
Amir Goldstein <amir73il@...il.com>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Ben Skeggs <bskeggs@...hat.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Joerg Roedel <joro@...tes.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Zhang Rui <rui.zhang@...el.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v1] ACPI: Switch to use generic UUID API
Hi,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> writes:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use uuid_le type. At the same time we
> convert current users.
>
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.
>
> The conversion fixes a potential bug in int340x_thermal as well since
> we have to use memcmp() on binary data.
>
> Cc: Rafael J. Wysocki <rjw@...ysocki.net>
> Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>
> Cc: Borislav Petkov <bp@...e.de>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Amir Goldstein <amir73il@...il.com>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> Cc: Jani Nikula <jani.nikula@...ux.intel.com>
> Cc: Ben Skeggs <bskeggs@...hat.com>
> Cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> Cc: Joerg Roedel <joro@...tes.org>
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Yisen Zhuang <yisen.zhuang@...wei.com>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Zhang Rui <rui.zhang@...el.com>
> Cc: Felipe Balbi <balbi@...nel.org>
> Cc: Mathias Nyman <mathias.nyman@...el.com>
> Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> Cc: Liam Girdwood <lgirdwood@...il.com>
> Cc: Mark Brown <broonie@...nel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
> index a15ec71d0423..6b5284ec76df 100644
> --- a/drivers/usb/dwc3/dwc3-pci.c
> +++ b/drivers/usb/dwc3/dwc3-pci.c
> @@ -56,7 +56,7 @@ struct dwc3_pci {
> struct platform_device *dwc3;
> struct pci_dev *pci;
>
> - u8 uuid[16];
> + uuid_le uuid;
>
> unsigned int has_dsm_for_pm:1;
> };
> @@ -118,7 +118,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
>
> if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
> pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
> - acpi_str_to_uuid(PCI_INTEL_BXT_DSM_UUID, dwc->uuid);
> + uuid_le_to_bin(PCI_INTEL_BXT_DSM_UUID, &dwc->uuid);
> dwc->has_dsm_for_pm = true;
> }
>
> @@ -288,7 +288,7 @@ static int dwc3_pci_dsm(struct dwc3_pci *dwc, int param)
> tmp.type = ACPI_TYPE_INTEGER;
> tmp.integer.value = param;
>
> - obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), dwc->uuid,
> + obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), &dwc->uuid,
> 1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4);
> if (!obj) {
> dev_err(&dwc->pci->dev, "failed to evaluate _DSM\n");
Acked-by: Felipe Balbi <felipe.balbi@...ux.intel.com>
--
balbi
Powered by blists - more mailing lists