linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the usb tree with the uuid tree
@ 2017-06-29  4:48 Stephen Rothwell
  2017-06-29 14:59 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2017-06-29  4:48 UTC (permalink / raw)
  To: Greg KH, Christoph Hellwig
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Heikki Krogerus, Andy Shevchenko

Hi Greg,

Today's linux-next merge of the usb tree got a conflict in:

  drivers/usb/misc/ucsi.c

between commit:

  94116f8126de ("ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()")

from the uuid tree and commit:

  8243edf44152 ("usb: typec: ucsi: Add ACPI driver")

from the usb tree.

I fixed it up (the latter deleted the file, so I did that - I think the
new code is ok with then new guid handling) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

Almost right :-(

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):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Jun 2017 14:36:10 +1000
Subject: [PATCH] usb: typec: fix for "ACPI: Switch to use generic guid_t in
 acpi_evaluate_dsm()"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/usb/typec/ucsi/ucsi_acpi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c
index 3fb2e48e1c91..7b7c9373a9b6 100644
--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
+++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
@@ -23,14 +23,14 @@ struct ucsi_acpi {
 	struct device *dev;
 	struct ucsi *ucsi;
 	struct ucsi_ppm ppm;
-	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);
 	if (!obj) {
 		dev_err(ua->dev, "%s: failed to evaluate _DSM %d\n",
-- 
2.11.0

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: linux-next: manual merge of the usb tree with the uuid tree
  2017-06-29  4:48 linux-next: manual merge of the usb tree with the uuid tree Stephen Rothwell
@ 2017-06-29 14:59 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2017-06-29 14:59 UTC (permalink / raw)
  To: Stephen Rothwell, Greg KH, Christoph Hellwig
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Heikki Krogerus

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@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29  4:48 linux-next: manual merge of the usb tree with the uuid tree Stephen Rothwell
2017-06-29 14:59 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).