Re: linux-next: manual merge of the usb tree with the uuid tree

From: Andy Shevchenko
Date: Thu Jun 29 2017 - 10:59:30 EST


On Thu, 2017-06-29 at 14:48 +1000, Stephen Rothwell wrote:

> I got the following error:
>
> drivers/usb/typec/ucsi/ucsi_acpi.c: In function 'ucsi_acpi_dsm':
> drivers/usb/typec/ucsi/ucsi_acpi.c:33:48: error: passing argument 2 of
> 'acpi_evaluate_dsm' from incompatible pointer type [-
> Werror=incompatible-pointer-types]
> Â obj = acpi_evaluate_dsm(ACPI_HANDLE(ua->dev), ua->uuid.b, 1, func,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ^
> In file included from include/linux/acpi.h:44:0,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfrom drivers/usb/typec/ucsi/ucsi_acpi.c:14:
> include/acpi/acpi_bus.h:65:20: note: expected 'const guid_t * {aka
> const struct <anonymous> *}' but argument is of type '__u8 * {aka
> unsigned char *}'
> Âunion acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t
> *guid,ÂÂ
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ^
>
> I have applied the following merge fix patch (the first hunk is
> probably not strictly necessary):

It is necessary. The goal of next portion of the UUID related stuff is
to get rid of those _le / _be types completely (uuid_be gone I suppose
already).

Patch itself looks good to me.

> - uuid_le uuid;
> + guid_t uuid;
> Â};
> Â
> Âstatic int ucsi_acpi_dsm(struct ucsi_acpi *ua, int func)
> Â{
> Â union acpi_object *obj;
> Â
> - obj = acpi_evaluate_dsm(ACPI_HANDLE(ua->dev), ua->uuid.b, 1,
> func,

> + obj = acpi_evaluate_dsm(ACPI_HANDLE(ua->dev), &ua->uuid, 1,
> func,
> Â NULL);

Can it be one line after all?

> Â if (!obj) {
> Â dev_err(ua->dev, "%s: failed to evaluate _DSM %d\n",

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy