Skip to contentSkip to conversation

linux-next: manual merge of the usb tree with the usb.current tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Feb 20, 2024 – Feb 26, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

drivers/usb/roles/class.c

between commit:

b787a3e78175 ("usb: roles: don't get/set_role() when usb_role_switch is unregistered")

from the usb.current tree and commit:

9a270ec7bfb0 ("usb: roles: Link the switch to its connector")

from the usb tree.

I fixed it up (I think - see below) 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.

Signature · 38 lines
Cheers,
Stephen Rothwell

diff --cc drivers/usb/roles/class.c
index 70165dd86b5d,4ad03c93c17f..000000000000
--- a/drivers/usb/roles/class.c
+++ b/drivers/usb/roles/class.c
@@@ -361,8 -379,12 +388,14 @@@ usb_role_switch_register(struct device 
  		return ERR_PTR(ret);
  	}
  
+ 	if (dev_fwnode(&sw->dev)) {
+ 		ret = component_add(&sw->dev, &connector_ops);
+ 		if (ret)
+ 			dev_warn(&sw->dev, "failed to add component\n");
+ 	}
+ 
 +	sw->registered = true;
 +
  	/* TODO: Symlinks for the host port and the device controller. */
  
  	return sw;
@@@ -377,10 -399,11 +410,12 @@@ EXPORT_SYMBOL_GPL(usb_role_switch_regis
   */
  void usb_role_switch_unregister(struct usb_role_switch *sw)
  {
- 	if (!IS_ERR_OR_NULL(sw)) {
- 		sw->registered = false;
- 		device_unregister(&sw->dev);
- 	}
+ 	if (IS_ERR_OR_NULL(sw))
+ 		return;
++	sw->registered = false;
+ 	if (dev_fwnode(&sw->dev))
+ 		component_del(&sw->dev, &connector_ops);
+ 	device_unregister(&sw->dev);
  }
  EXPORT_SYMBOL_GPL(usb_role_switch_unregister);
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

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

drivers/usb/roles/class.c

between commit:

b787a3e78175 ("usb: roles: don't get/set_role() when usb_role_switch is unregistered")

from the usb.current tree and commit:

9a270ec7bfb0 ("usb: roles: Link the switch to its connector")

Quoted 8 lines

from the usb tree.

I fixed it up (I think - see below) 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.

Looks good, thanks!

greg k-h

#2 lore raw
In reply to Stephen Rothwell
Quoted 14 lines · Stephen Rothwell

Hi all,

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

drivers/usb/roles/class.c

between commit:

b787a3e78175 ("usb: roles: don't get/set_role() when usb_role_switch is unregistered")

from the usb.current tree and commit:

9a270ec7bfb0 ("usb: roles: Link the switch to its connector")

Quoted 8 lines

from the usb tree.

I fixed it up (I think - see below) 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.

Should now be fixed up in my usb-next branch, thanks!

greg k-h