Skip to contentSkip to conversation

linux-next: manual merge of the char-misc tree with the driver-core tree

PATCH Stephen Rothwell 7 participants 14 messages Jul 1, 2019 – Jul 15, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

drivers/hwtracing/coresight/of_coresight.c

between commit:

418e3ea157ef ("bus_find_device: Unify the match callback with class_find_device")

from the driver-core tree and commits:

22aa495a6477 ("coresight: Rename of_coresight to coresight-platform") 20961aea982e ("coresight: platform: Use fwnode handle for device search")

from the char-misc tree.

I fixed it up (I removed the file and added the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 1 Jul 2019 19:07:20 +1000
Subject: [PATCH] coresight: fix for "bus_find_device: Unify the match callback
with class_find_device"

---
 drivers/hwtracing/coresight/coresight-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-platform.c +1 -1
index 3c5ceda8db24..fc67f6ae0b3e 100644
@@ -37,7 +37,7 @@ static int coresight_alloc_conns(struct device *dev,
 	return 0;
 }
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode)
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode)
 {
 	return dev_fwnode(dev) == fwnode;
 }
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 53 lines · Stephen Rothwell

Hi all,

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

drivers/hwtracing/coresight/of_coresight.c

between commit:

418e3ea157ef ("bus_find_device: Unify the match callback with class_find_device")

from the driver-core tree and commits:

22aa495a6477 ("coresight: Rename of_coresight to coresight-platform") 20961aea982e ("coresight: platform: Use fwnode handle for device search")

from the char-misc tree.

I fixed it up (I removed the file and added the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 1 Jul 2019 19:07:20 +1000
Subject: [PATCH] coresight: fix for "bus_find_device: Unify the match callback
with class_find_device"

---
 drivers/hwtracing/coresight/coresight-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-platform.c +1 -1
index 3c5ceda8db24..fc67f6ae0b3e 100644
@@ -37,7 +37,7 @@ static int coresight_alloc_conns(struct device *dev,
 	return 0;
 }
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode)
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode)
 {
 	return dev_fwnode(dev) == fwnode;
 }
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell

Hi Stephen,

The attached patch is needed in addition to this to avoid a build error about incompatible pointer types (in the commit message).

Cheers,
Nathan

From 2b2dd836a7370d9b33fb0f70515ecd7bc8462c0a Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <[email protected]>
Date: Mon, 1 Jul 2019 11:28:08 -0700
Subject: [PATCH] coresight: Make the coresight_device_fwnode_match
declaration's fwnode parameter const

drivers/hwtracing/coresight/coresight.c:1051:11: error: incompatible pointer types passing 'int (struct device *, void *)' to parameter of type 'int (*)(struct device *, const void *)' [-Werror,-Wincompatible-pointer-types]

                                      coresight_device_fwnode_match);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:173:17: note: passing argument to parameter 'match' here
                               int (*match)(struct device *dev, const void *data));
                                     ^

1 error generated.

---
 drivers/hwtracing/coresight/coresight-priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-priv.h +1 -1
index 8b07fe55395a..7d401790dd7e 100644
@@ -202,6 +202,6 @@ static inline void *coresight_get_uci_data(const struct amba_id *id)
 
 void coresight_release_platform_data(struct coresight_platform_data *pdata);
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode);
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode);
 
 #endif
Signature · 1 line
2.22.0
#2 lore raw

Hi Nathan,

Quoted 3 lines · On Mon, 1 Jul 2019 11:39:40 -0700 Nathan Chancellor <[email protected]>…

The attached patch is needed in addition to this to avoid a build error about incompatible pointer types (in the commit message).

Thanks, I will add it to my merge resolution today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
In reply to Stephen Rothwell
Quoted 53 lines · Stephen Rothwell

Hi all,

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

drivers/hwtracing/coresight/of_coresight.c

between commit:

418e3ea157ef ("bus_find_device: Unify the match callback with class_find_device")

from the driver-core tree and commits:

22aa495a6477 ("coresight: Rename of_coresight to coresight-platform") 20961aea982e ("coresight: platform: Use fwnode handle for device search")

from the char-misc tree.

I fixed it up (I removed the file and added the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 1 Jul 2019 19:07:20 +1000
Subject: [PATCH] coresight: fix for "bus_find_device: Unify the match callback
with class_find_device"

---
 drivers/hwtracing/coresight/coresight-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-platform.c +1 -1
index 3c5ceda8db24..fc67f6ae0b3e 100644
@@ -37,7 +37,7 @@ static int coresight_alloc_conns(struct device *dev,
 	return 0;
 }
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode)
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode)
 {
 	return dev_fwnode(dev) == fwnode;
 }
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell

Hi Stephen and Michael,

It looks like a similar fix is needed for the vhost tree because of commit edcd69ab9a32 ("iommu: Add virtio-iommu driver") interacting with commit 92ce7e83b4e5 ("driver_find_device: Unify the match function with class_find_device()") in the driver-core tree (my patch is attached).

Cheers,
Nathan

From 347a1bbeb8ba757648ceeed1839df101417a3d9f Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <[email protected]>
Date: Mon, 1 Jul 2019 12:54:28 -0700
Subject: [PATCH] iommu/virtio: Constify data parameter in viommu_match_node

After commit 92ce7e83b4e5 ("driver_find_device: Unify the match function with class_find_device()") in the driver-core tree.

---
 drivers/iommu/virtio-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/virtio-iommu.c +1 -1
index 4620dd221ffd..433f4d2ee956 100644
@@ -839,7 +839,7 @@ static void viommu_put_resv_regions(struct device *dev, struct list_head *head)
 static struct iommu_ops viommu_ops;
 static struct virtio_driver virtio_iommu_drv;
 
-static int viommu_match_node(struct device *dev, void *data)
+static int viommu_match_node(struct device *dev, const void *data)
 {
 	return dev->parent->fwnode == data;
 }
Signature · 1 line
2.22.0
#4 lore raw

Hi Nathan,

Quoted 5 lines · On Mon, 1 Jul 2019 13:04:18 -0700 Nathan Chancellor <[email protected]>…

It looks like a similar fix is needed for the vhost tree because of commit edcd69ab9a32 ("iommu: Add virtio-iommu driver") interacting with commit 92ce7e83b4e5 ("driver_find_device: Unify the match function with class_find_device()") in the driver-core tree (my patch is attached).

Thanks for noticing that, I will add that to the merge of the vhost tree from today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#5 lore raw
In reply to Nathan Chancellor

Hi,

[Adding Joerg]

Quoted 57 lines · Nathan Chancellor
Quoted 53 lines · Stephen Rothwell

Hi all,

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

drivers/hwtracing/coresight/of_coresight.c

between commit:

418e3ea157ef ("bus_find_device: Unify the match callback with class_find_device")

from the driver-core tree and commits:

22aa495a6477 ("coresight: Rename of_coresight to coresight-platform") 20961aea982e ("coresight: platform: Use fwnode handle for device search")

from the char-misc tree.

I fixed it up (I removed the file and added the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 1 Jul 2019 19:07:20 +1000
Subject: [PATCH] coresight: fix for "bus_find_device: Unify the match callback
with class_find_device"

---
 drivers/hwtracing/coresight/coresight-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-platform.c +1 -1
index 3c5ceda8db24..fc67f6ae0b3e 100644
@@ -37,7 +37,7 @@ static int coresight_alloc_conns(struct device *dev,
 	return 0;
 }
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode)
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode)
 {
 	return dev_fwnode(dev) == fwnode;
 }
Signature · 5 lines
2.20.1

-- 
Cheers,
Stephen Rothwell

Hi Stephen and Michael,

Quoted 4 lines

It looks like a similar fix is needed for the vhost tree because of commit edcd69ab9a32 ("iommu: Add virtio-iommu driver") interacting with commit 92ce7e83b4e5 ("driver_find_device: Unify the match function with class_find_device()") in the driver-core tree (my patch is attached).

Nathan, thanks for noticing and fixing this.

Joerg, the virtio-iommu driver build failed in next because of a dependency on driver-core changes for v5.3. I'm not sure what the best practice is in this case, I guess I will resend the driver as applied onto the latest driver-core, to have it working in v5.3?

Thanks,
Jean

Quoted 29 lines

From 347a1bbeb8ba757648ceeed1839df101417a3d9f Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <[email protected]>
Date: Mon, 1 Jul 2019 12:54:28 -0700
Subject: [PATCH] iommu/virtio: Constify data parameter in viommu_match_node

After commit 92ce7e83b4e5 ("driver_find_device: Unify the match function with class_find_device()") in the driver-core tree.

---
 drivers/iommu/virtio-iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/virtio-iommu.c +1 -1
index 4620dd221ffd..433f4d2ee956 100644
@@ -839,7 +839,7 @@ static void viommu_put_resv_regions(struct device *dev, struct list_head *head)
 static struct iommu_ops viommu_ops;
 static struct virtio_driver virtio_iommu_drv;
 
-static int viommu_match_node(struct device *dev, void *data)
+static int viommu_match_node(struct device *dev, const void *data)
 {
 	return dev->parent->fwnode == data;
 }
Signature · 1 line
2.22.0
maintainer
#6 lore raw
Quoted 6 lines · Jean-Philippe Brucker

Nathan, thanks for noticing and fixing this.

Joerg, the virtio-iommu driver build failed in next because of a dependency on driver-core changes for v5.3. I'm not sure what the best practice is in this case, I guess I will resend the driver as applied onto the latest driver-core, to have it working in v5.3?

This depends on what the vhost-tree maintainer prefers. I would probably merge the current driver-core into the virtio-iommu branch and put a fix on-top.

Regards,

Joerg

#7 lore raw
Quoted 8 lines · Joerg Roedel
Quoted 6 lines · Jean-Philippe Brucker

Nathan, thanks for noticing and fixing this.

Joerg, the virtio-iommu driver build failed in next because of a dependency on driver-core changes for v5.3. I'm not sure what the best practice is in this case, I guess I will resend the driver as applied onto the latest driver-core, to have it working in v5.3?

Quoted 8 lines

This depends on what the vhost-tree maintainer prefers. I would probably merge the current driver-core into the virtio-iommu branch and put a fix on-top.

Regards,

Joerg

I can drop virtio iommu from my tree. Where's yours? I'd like to take a last look and send an ack.

Signature · 1 line
MST
maintainer
#8 lore raw
Quoted 2 lines · Michael S. Tsirkin

I can drop virtio iommu from my tree. Where's yours? I'd like to take a last look and send an ack.

It is not in my tree yet, because I was waiting for your ack on the patches wrt. the spec.

Given that the merge window is pretty close I can't promise to take it into my tree for v5.3 when you ack it, so if it should go upstream this time its better to keep it in your tree.

Regards,

Joerg

#9 lore raw
Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Michael S. Tsirkin

I can drop virtio iommu from my tree. Where's yours? I'd like to take a last look and send an ack.

It is not in my tree yet, because I was waiting for your ack on the patches wrt. the spec.

Quoted 8 lines

Given that the merge window is pretty close I can't promise to take it into my tree for v5.3 when you ack it, so if it should go upstream this time its better to keep it in your tree.

Regards,

Joerg

Hmm. But then the merge build fails. I guess I will have to include the patch in the pull request then?

#10 lore raw

Hi all,

Quoted 9 lines · On Tue, 2 Jul 2019 13:05:59 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Michael S. Tsirkin

I can drop virtio iommu from my tree. Where's yours? I'd like to take a last look and send an ack.

It is not in my tree yet, because I was waiting for your ack on the patches wrt. the spec.

Quoted 7 lines
Quoted 3 lines

Given that the merge window is pretty close I can't promise to take it into my tree for v5.3 when you ack it, so if it should go upstream this time its better to keep it in your tree.

Hmm. But then the merge build fails. I guess I will have to include the patch in the pull request then?

All you (and the driver-core maintainer) need to do is make sure you tell Linus that the merge requires the fix ... he can then apply it to the merge commit just as I have. Linus has asked that maintainers do not (in general) cross merge to avoid these (semantic) conflicts. Sometimes, in more complex cases, it may be necessary for maintainers to share a (non changing) subset of their trees, but this case is pretty trivial.

Signature · 2 lines
Cheers,
Stephen Rothwell
maintainer
#11 lore raw

Greg, Stephen, All,

Quoted 20 lines · Stephen Rothwell

Hi all,

Quoted 9 lines · On Tue, 2 Jul 2019 13:05:59 -0400 "Michael S. Tsirkin" <[email protected]> wrote:
Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Michael S. Tsirkin

I can drop virtio iommu from my tree. Where's yours? I'd like to take a last look and send an ack.

It is not in my tree yet, because I was waiting for your ack on the patches wrt. the spec.

Quoted 7 lines
Quoted 3 lines

Given that the merge window is pretty close I can't promise to take it into my tree for v5.3 when you ack it, so if it should go upstream this time its better to keep it in your tree.

Hmm. But then the merge build fails. I guess I will have to include the patch in the pull request then?

Quoted 8 lines

All you (and the driver-core maintainer) need to do is make sure you tell Linus that the merge requires the fix ... he can then apply it to the merge commit just as I have. Linus has asked that maintainers do not (in general) cross merge to avoid these (semantic) conflicts. Sometimes, in more complex cases, it may be necessary for maintainers to share a (non changing) subset of their trees, but this case is pretty trivial.

Please let me know if there is something I could help with.

Cheers
Suzuki

#12 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 38 lines · On Mon, 1 Jul 2019 19:09:40 +1000 Stephen Rothwell <[email protected]> wrote:

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

drivers/hwtracing/coresight/of_coresight.c

between commit:

418e3ea157ef ("bus_find_device: Unify the match callback with class_find_device")

from the driver-core tree and commits:

22aa495a6477 ("coresight: Rename of_coresight to coresight-platform") 20961aea982e ("coresight: platform: Use fwnode handle for device search")

from the char-misc tree.

I fixed it up (I removed the file and added the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 1 Jul 2019 19:07:20 +1000
Subject: [PATCH] coresight: fix for "bus_find_device: Unify the match callback
with class_find_device"

---
 drivers/hwtracing/coresight/coresight-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-platform.c +0 -0
index 3c5ceda8db24..fc67f6ae0b3e 100644

drivers/hwtracing/coresight/coresight-platform.c static int coresight_alloc_conns(struct device *dev, · line 43

Quoted 8 lines
drivers/hwtracing/coresight/coresight-platform.c +1 -1
@@ -37,7 +37,7 @@ static int coresight_alloc_conns(struct device *dev,
 	return 0;
 }
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode)
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode)
 {
 	return dev_fwnode(dev) == fwnode;
 }

This is now a conflict between the driver-core tree and Linus' tree.

The declaration of coresight_device_fwnode_match() also needs fixing up in drivers/hwtracing/coresight/coresight-priv.h (as done in the patch below supplied by Nathan Chancellor).

From: Nathan Chancellor <[email protected]>
Date: Mon, 1 Jul 2019 11:28:08 -0700
Subject: [PATCH] coresight: Make the coresight_device_fwnode_match declaration's fwnode parameter const

drivers/hwtracing/coresight/coresight.c:1051:11: error: incompatible pointer types passing 'int (struct device *, void *)' to parameter of type 'int (*)(struct device *, const void *)' [-Werror,-Wincompatible-pointer-types]

                                      coresight_device_fwnode_match);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:173:17: note: passing argument to parameter 'match' here
                               int (*match)(struct device *dev, const void *data));
                                     ^

1 error generated.

---
 drivers/hwtracing/coresight/coresight-priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-priv.h +1 -1
index 8b07fe55395a..7d401790dd7e 100644
@@ -202,6 +202,6 @@ static inline void *coresight_get_uci_data(const struct amba_id *id)
 
 void coresight_release_platform_data(struct coresight_platform_data *pdata);
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode);
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode);
 
 #endif
Signature · 5 lines
2.22.0

-- 
Cheers,
Stephen Rothwell
#13 lore raw

Hi Stephen,

Quoted 53 lines · Stephen Rothwell

Hi all,

Quoted 38 lines · On Mon, 1 Jul 2019 19:09:40 +1000 Stephen Rothwell <[email protected]> wrote:

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

drivers/hwtracing/coresight/of_coresight.c

between commit:

418e3ea157ef ("bus_find_device: Unify the match callback with class_find_device")

from the driver-core tree and commits:

22aa495a6477 ("coresight: Rename of_coresight to coresight-platform") 20961aea982e ("coresight: platform: Use fwnode handle for device search")

from the char-misc tree.

I fixed it up (I removed the file and added the following merge fix patch) 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.

From: Stephen Rothwell <[email protected]>
Date: Mon, 1 Jul 2019 19:07:20 +1000
Subject: [PATCH] coresight: fix for "bus_find_device: Unify the match callback
with class_find_device"

---
 drivers/hwtracing/coresight/coresight-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-platform.c +0 -0
index 3c5ceda8db24..fc67f6ae0b3e 100644

drivers/hwtracing/coresight/coresight-platform.c static int coresight_alloc_conns(struct device *dev, · line 43

Quoted 8 lines
drivers/hwtracing/coresight/coresight-platform.c +1 -1
@@ -37,7 +37,7 @@ static int coresight_alloc_conns(struct device *dev,
      return 0;
 }
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode)
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode)
 {
      return dev_fwnode(dev) == fwnode;
 }

This is now a conflict between the driver-core tree and Linus' tree.

Quoted 3 lines

The declaration of coresight_device_fwnode_match() also needs fixing up in drivers/hwtracing/coresight/coresight-priv.h (as done in the patch below supplied by Nathan Chancellor).

I have updated my next branch and you shouldn't see this again.

Thanks,
Mathieu

Quoted 36 lines

From: Nathan Chancellor <[email protected]>
Date: Mon, 1 Jul 2019 11:28:08 -0700
Subject: [PATCH] coresight: Make the coresight_device_fwnode_match declaration's fwnode parameter const

drivers/hwtracing/coresight/coresight.c:1051:11: error: incompatible pointer types passing 'int (struct device *, void *)' to parameter of type 'int (*)(struct device *, const void *)' [-Werror,-Wincompatible-pointer-types]

                                      coresight_device_fwnode_match);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:173:17: note: passing argument to parameter 'match' here
                               int (*match)(struct device *dev, const void *data));
                                     ^

1 error generated.

---
 drivers/hwtracing/coresight/coresight-priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-priv.h +1 -2
index 8b07fe55395a..7d401790dd7e 100644
@@ -202,6 +202,6 @@ static inline void *coresight_get_uci_data(const struct amba_id *id)
 
 void coresight_release_platform_data(struct coresight_platform_data *pdata);
 
-int coresight_device_fwnode_match(struct device *dev, void *fwnode);
+int coresight_device_fwnode_match(struct device *dev, const void *fwnode);
 
 #endif
--

2.22.0

--
Cheers,
Stephen Rothwell