linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Greg KH <greg@kroah.com>, "Paul E. McKenney" <paulmck@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Saravana Kannan <saravanak@google.com>
Subject: linux-next: manual merge of the driver-core tree with the rcu tree
Date: Fri, 10 Feb 2023 12:48:18 +1100	[thread overview]
Message-ID: <20230210124818.2caaa77f@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]

Hi all,

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

  drivers/base/core.c

between commit:

  dc7c31b07ade ("drivers/base: Remove CONFIG_SRCU")

from the rcu tree and commit:

  3a2dbc510c43 ("driver core: fw_devlink: Don't purge child fwnode's consumer links")

from the driver-core tree.

I fixed it up (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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/base/core.c
index bb36aca8d1b7,2712a1a1e959..000000000000
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@@ -181,6 -202,52 +202,51 @@@ void fw_devlink_purge_absent_suppliers(
  }
  EXPORT_SYMBOL_GPL(fw_devlink_purge_absent_suppliers);
  
+ /**
+  * __fwnode_links_move_consumers - Move consumer from @from to @to fwnode_handle
+  * @from: move consumers away from this fwnode
+  * @to: move consumers to this fwnode
+  *
+  * Move all consumer links from @from fwnode to @to fwnode.
+  */
+ static void __fwnode_links_move_consumers(struct fwnode_handle *from,
+ 					  struct fwnode_handle *to)
+ {
+ 	struct fwnode_link *link, *tmp;
+ 
+ 	list_for_each_entry_safe(link, tmp, &from->consumers, s_hook) {
+ 		__fwnode_link_add(link->consumer, to, link->flags);
+ 		__fwnode_link_del(link);
+ 	}
+ }
+ 
+ /**
+  * __fw_devlink_pickup_dangling_consumers - Pick up dangling consumers
+  * @fwnode: fwnode from which to pick up dangling consumers
+  * @new_sup: fwnode of new supplier
+  *
+  * If the @fwnode has a corresponding struct device and the device supports
+  * probing (that is, added to a bus), then we want to let fw_devlink create
+  * MANAGED device links to this device, so leave @fwnode and its descendant's
+  * fwnode links alone.
+  *
+  * Otherwise, move its consumers to the new supplier @new_sup.
+  */
+ static void __fw_devlink_pickup_dangling_consumers(struct fwnode_handle *fwnode,
+ 						   struct fwnode_handle *new_sup)
+ {
+ 	struct fwnode_handle *child;
+ 
+ 	if (fwnode->dev && fwnode->dev->bus)
+ 		return;
+ 
+ 	fwnode->flags |= FWNODE_FLAG_NOT_DEVICE;
+ 	__fwnode_links_move_consumers(fwnode, new_sup);
+ 
+ 	fwnode_for_each_available_child_node(fwnode, child)
+ 		__fw_devlink_pickup_dangling_consumers(child, new_sup);
+ }
+ 
 -#ifdef CONFIG_SRCU
  static DEFINE_MUTEX(device_links_lock);
  DEFINE_STATIC_SRCU(device_links_srcu);
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2023-02-10  1:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  1:48 Stephen Rothwell [this message]
2023-02-10  6:55 ` linux-next: manual merge of the driver-core tree with the rcu tree Paul E. McKenney
2023-02-10  7:18 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2019-08-13  5:50 Stephen Rothwell
2019-08-13  8:50 ` Rafael J. Wysocki
2019-08-13 14:22   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230210124818.2caaa77f@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=greg@kroah.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).