All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v3 24/28] dm: Drop the unused arg in uclass_find_device_by_seq()
Date: Wed, 16 Dec 2020 21:20:29 -0700	[thread overview]
Message-ID: <20201217042034.411902-21-sjg@chromium.org> (raw)
In-Reply-To: <20201217042034.411902-1-sjg@chromium.org>

Now that there is only one sequence number (rather than both requested and
assigned ones) we can simplify this function. Also update its caller to
simplify the logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/arm/mach-k3/am6_init.c     |  2 +-
 arch/arm/mach-k3/j721e_init.c   |  2 +-
 arch/arm/mach-k3/sysfw-loader.c |  2 +-
 drivers/core/device.c           | 16 ++++------
 drivers/core/uclass.c           | 22 +++++---------
 drivers/spi/spi-uclass.c        |  4 +--
 drivers/usb/host/usb-uclass.c   |  4 +--
 include/dm/device.h             | 18 ++++--------
 include/dm/uclass-internal.h    | 18 ++++--------
 net/eth-uclass.c                |  2 +-
 test/dm/bus.c                   | 16 +++++-----
 test/dm/test-fdt.c              | 52 ++++++++++++++++-----------------
 12 files changed, 64 insertions(+), 94 deletions(-)

diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index 603834e5078..0fed5aec59d 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -208,7 +208,7 @@ void board_init_f(ulong dummy)
 	 * firmware (SYSFW) image for various purposes and SYSFW depends on us
 	 * to initialize its pin settings.
 	 */
-	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, true, &dev);
+	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, &dev);
 	if (!ret)
 		pinctrl_select_state(dev, "default");
 
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index a36e4ed603b..0201690f93c 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -167,7 +167,7 @@ void board_init_f(ulong dummy)
 	 * firmware (SYSFW) image for various purposes and SYSFW depends on us
 	 * to initialize its pin settings.
 	 */
-	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, true, &dev);
+	ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, &dev);
 	if (!ret)
 		pinctrl_select_state(dev, "default");
 
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 78c158c63f7..708d9c8508e 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -223,7 +223,7 @@ static void *k3_sysfw_get_spi_addr(void)
 	int ret;
 
 	ret = uclass_find_device_by_seq(UCLASS_SPI, CONFIG_SF_DEFAULT_BUS,
-					true, &dev);
+					&dev);
 	if (ret)
 		return NULL;
 
diff --git a/drivers/core/device.c b/drivers/core/device.c
index e8435b8ba42..b878a4d4b69 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -647,15 +647,15 @@ int device_get_child_count(const struct udevice *parent)
 	return count;
 }
 
-int device_find_child_by_seq(const struct udevice *parent, int seq_or_req_seq,
-			     bool find_req_seq, struct udevice **devp)
+int device_find_child_by_seq(const struct udevice *parent, int seq,
+			     struct udevice **devp)
 {
 	struct udevice *dev;
 
 	*devp = NULL;
 
 	list_for_each_entry(dev, &parent->child_head, sibling_node) {
-		if (dev->sqq == seq_or_req_seq) {
+		if (dev->sqq == seq) {
 			*devp = dev;
 			return 0;
 		}
@@ -671,14 +671,8 @@ int device_get_child_by_seq(const struct udevice *parent, int seq,
 	int ret;
 
 	*devp = NULL;
-	ret = device_find_child_by_seq(parent, seq, false, &dev);
-	if (ret == -ENODEV) {
-		/*
-		 * We didn't find it in probed devices. See if there is one
-		 * that will request this seq if probed.
-		 */
-		ret = device_find_child_by_seq(parent, seq, true, &dev);
-	}
+	ret = device_find_child_by_seq(parent, seq, &dev);
+
 	return device_get_device_tail(dev, ret, devp);
 }
 
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 78765e548ef..42c9ba58281 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -288,25 +288,23 @@ int uclass_find_next_free_req_seq(struct uclass *uc)
 	return max + 1;
 }
 
-int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
-			      bool find_req_seq, struct udevice **devp)
+int uclass_find_device_by_seq(enum uclass_id id, int seq, struct udevice **devp)
 {
 	struct uclass *uc;
 	struct udevice *dev;
 	int ret;
 
 	*devp = NULL;
-	log_debug("%d %d\n", find_req_seq, seq_or_req_seq);
-	if (seq_or_req_seq == -1)
+	log_debug("%d\n", seq);
+	if (seq == -1)
 		return -ENODEV;
 	ret = uclass_get(id, &uc);
 	if (ret)
 		return ret;
 
 	uclass_foreach_dev(dev, uc) {
-		log_debug("   - %d %d '%s'\n",
-			  dev->req_seq, dev_seq(dev), dev->name);
-		if (dev_seq(dev) == seq_or_req_seq) {
+		log_debug("   - %d '%s'\n", dev->sqq, dev->name);
+		if (dev->sqq == seq) {
 			*devp = dev;
 			log_debug("   - found\n");
 			return 0;
@@ -466,14 +464,8 @@ int uclass_get_device_by_seq(enum uclass_id id, int seq, struct udevice **devp)
 	int ret;
 
 	*devp = NULL;
-	ret = uclass_find_device_by_seq(id, seq, false, &dev);
-	if (ret == -ENODEV) {
-		/*
-		 * We didn't find it in probed devices. See if there is one
-		 * that will request this seq if probed.
-		 */
-		ret = uclass_find_device_by_seq(id, seq, true, &dev);
-	}
+	ret = uclass_find_device_by_seq(id, seq, &dev);
+
 	return uclass_get_device_tail(dev, ret, devp);
 }
 
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 9dd32ab333b..f3b8ffad425 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -273,7 +273,7 @@ int spi_cs_is_valid(unsigned int busnum, unsigned int cs)
 	struct udevice *bus;
 	int ret;
 
-	ret = uclass_find_device_by_seq(UCLASS_SPI, busnum, false, &bus);
+	ret = uclass_find_device_by_seq(UCLASS_SPI, busnum, &bus);
 	if (ret) {
 		debug("%s: No bus %d\n", __func__, busnum);
 		return ret;
@@ -302,7 +302,7 @@ int spi_find_bus_and_cs(int busnum, int cs, struct udevice **busp,
 	struct udevice *bus, *dev;
 	int ret;
 
-	ret = uclass_find_device_by_seq(UCLASS_SPI, busnum, false, &bus);
+	ret = uclass_find_device_by_seq(UCLASS_SPI, busnum, &bus);
 	if (ret) {
 		debug("%s: No bus %d\n", __func__, busnum);
 		return ret;
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index fee92c9d779..a2bd7436f42 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -394,7 +394,7 @@ int usb_setup_ehci_gadget(struct ehci_ctrl **ctlrp)
 	int ret;
 
 	/* Find the old device and remove it */
-	ret = uclass_find_device_by_seq(UCLASS_USB, 0, true, &dev);
+	ret = uclass_find_device_by_seq(UCLASS_USB, 0, &dev);
 	if (ret)
 		return ret;
 	ret = device_remove(dev, DM_REMOVE_NORMAL);
@@ -417,7 +417,7 @@ int usb_remove_ehci_gadget(struct ehci_ctrl **ctlrp)
 	int ret;
 
 	/* Find the old device and remove it */
-	ret = uclass_find_device_by_seq(UCLASS_USB, 0, true, &dev);
+	ret = uclass_find_device_by_seq(UCLASS_USB, 0, &dev);
 	if (ret)
 		return ret;
 	ret = device_remove(dev, DM_REMOVE_NORMAL);
diff --git a/include/dm/device.h b/include/dm/device.h
index 15731d6c270..75f75497c5f 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -452,24 +452,16 @@ int device_get_child_count(const struct udevice *parent);
 /**
  * device_find_child_by_seq() - Find a child device based on a sequence
  *
- * This searches for a device with the given seq or req_seq.
- *
- * For seq, if an active device has this sequence it will be returned.
- * If there is no such device then this will return -ENODEV.
- *
- * For req_seq, if a device (whether activated or not) has this req_seq
- * value, that device will be returned. This is a strong indication that
- * the device will receive that sequence when activated.
+ * This searches for a device with the given seq.
  *
  * @parent: Parent device
- * @seq_or_req_seq: Sequence number to find (0=first)
- * @find_req_seq: true to find req_seq, false to find seq
+ * @seq: Sequence number to find (0=first)
  * @devp: Returns pointer to device (there is only one per for each seq).
  * Set to NULL if none is found
- * @return 0 if OK, -ve on error
+ * @return 0 if OK, -ENODEV if not found
  */
-int device_find_child_by_seq(const struct udevice *parent, int seq_or_req_seq,
-			     bool find_req_seq, struct udevice **devp);
+int device_find_child_by_seq(const struct udevice *parent, int seq,
+			     struct udevice **devp);
 
 /**
  * device_get_child_by_seq() - Get a child device based on a sequence
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index 2c21871e0fd..9c23d3f223e 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -103,25 +103,17 @@ int uclass_find_device_by_name(enum uclass_id id, const char *name,
 /**
  * uclass_find_device_by_seq() - Find uclass device based on ID and sequence
  *
- * This searches for a device with the given seq or req_seq.
- *
- * For seq, if an active device has this sequence it will be returned.
- * If there is no such device then this will return -ENODEV.
- *
- * For req_seq, if a device (whether activated or not) has this req_seq
- * value, that device will be returned. This is a strong indication that
- * the device will receive that sequence when activated.
+ * This searches for a device with the given seq.
  *
  * The device is NOT probed, it is merely returned.
  *
  * @id: ID to look up
- * @seq_or_req_seq: Sequence number to find (0=first)
- * @find_req_seq: true to find req_seq, false to find seq
+ * @seq: Sequence number to find (0=first)
  * @devp: Returns pointer to device (there is only one per for each seq)
- * @return 0 if OK, -ve on error
+ * @return 0 if OK, -ENODEV if not found
  */
-int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
-			      bool find_req_seq, struct udevice **devp);
+int uclass_find_device_by_seq(enum uclass_id id, int seq,
+			      struct udevice **devp);
 
 /**
  * uclass_find_device_by_of_offset() - Find a uclass device by device tree node
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 4eee0113eb1..e2d6731975a 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -232,7 +232,7 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
 	/* look for an index after "eth" */
 	index = simple_strtoul(name + 3, NULL, 10);
 
-	retval = uclass_find_device_by_seq(UCLASS_ETH, index, false, &dev);
+	retval = uclass_find_device_by_seq(UCLASS_ETH, index, &dev);
 	if (!retval) {
 		struct eth_pdata *pdata = dev->plat;
 		switch (op) {
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 77555e52937..60ddb1d6b14 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -156,17 +156,17 @@ static int dm_test_bus_children_funcs(struct unit_test_state *uts)
 	ut_asserteq_str("c-test at 5", dev->name);
 
 	/* Device with sequence number 0 should be accessible */
-	ut_asserteq(-ENODEV, device_find_child_by_seq(bus, -1, true, &dev));
-	ut_assertok(device_find_child_by_seq(bus, 0, true, &dev));
+	ut_asserteq(-ENODEV, device_find_child_by_seq(bus, -1, &dev));
+	ut_assertok(device_find_child_by_seq(bus, 0, &dev));
 	ut_assert(!(dev->flags & DM_FLAG_ACTIVATED));
-	ut_asserteq(0, device_find_child_by_seq(bus, 0, false, &dev));
+	ut_asserteq(0, device_find_child_by_seq(bus, 0, &dev));
 	ut_assertok(device_get_child_by_seq(bus, 0, &dev));
 	ut_assert(dev->flags & DM_FLAG_ACTIVATED);
-	ut_asserteq(0, device_find_child_by_seq(bus, 0, false, &dev));
+	ut_asserteq(0, device_find_child_by_seq(bus, 0, &dev));
 
 	/* There is no device with sequence number 2 */
-	ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, false, &dev));
-	ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, true, &dev));
+	ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, &dev));
+	ut_asserteq(-ENODEV, device_find_child_by_seq(bus, 2, &dev));
 	ut_asserteq(-ENODEV, device_get_child_by_seq(bus, 2, &dev));
 
 	/* Looking for something that is not a child */
@@ -220,7 +220,7 @@ static int dm_test_bus_children_iterators(struct unit_test_state *uts)
 	ut_asserteq_ptr(dev, NULL);
 
 	/* Move to the next child without using device_find_first_child() */
-	ut_assertok(device_find_child_by_seq(bus, 5, true, &dev));
+	ut_assertok(device_find_child_by_seq(bus, 5, &dev));
 	ut_asserteq_str("c-test at 5", dev->name);
 	ut_assertok(device_find_next_child(&dev));
 	ut_asserteq_str("c-test at 0", dev->name);
@@ -245,7 +245,7 @@ static int test_bus_parent_data(struct unit_test_state *uts)
 	ut_assertok(uclass_get_device(UCLASS_TEST_BUS, 0, &bus));
 
 	/* Check that parent data is allocated */
-	ut_assertok(device_find_child_by_seq(bus, 0, true, &dev));
+	ut_assertok(device_find_child_by_seq(bus, 0, &dev));
 	ut_asserteq_ptr(NULL, dev_get_parent_priv(dev));
 	ut_assertok(device_get_child_by_seq(bus, 0, &dev));
 	parent_data = dev_get_parent_priv(dev);
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 87e09f19cd1..5f443bdb6c0 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -348,11 +348,11 @@ static int dm_test_fdt_uclass_seq(struct unit_test_state *uts)
 	struct udevice *dev;
 
 	/* A few basic santiy tests */
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 3, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 3, &dev));
 	ut_asserteq_str("b-test", dev->name);
 	ut_asserteq(3, dev_seq(dev));
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 8, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 8, &dev));
 	ut_asserteq_str("a-test", dev->name);
 	ut_asserteq(8, dev_seq(dev));
 
@@ -360,11 +360,11 @@ static int dm_test_fdt_uclass_seq(struct unit_test_state *uts)
 	 * This device has no alias so gets the next value after all available
 	 * aliases. The last alias is testfdt12
 	 */
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 13, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_FDT, 13, &dev));
 	ut_asserteq_str("d-test", dev->name);
 	ut_asserteq(13, dev_seq(dev));
 
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 9, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 9,
 						       &dev));
 	ut_asserteq_ptr(NULL, dev);
 
@@ -395,22 +395,22 @@ static int dm_test_fdt_uclass_seq(struct unit_test_state *uts)
 	ut_asserteq(15, dev_seq(dev));
 
 	/* And we should still have holes in our sequence numbers */
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 0, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 0,
 						       &dev));
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 1, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 1,
 						       &dev));
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 2, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 2,
 						       &dev));
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 4, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 4,
 						       &dev));
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 7, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 7,
 						       &dev));
-	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 9, true,
+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 9,
 						       &dev));
 	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 10,
-						       true, &dev));
+						       &dev));
 	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_TEST_FDT, 11,
-						       true, &dev));
+						       &dev));
 
 	return 0;
 }
@@ -636,30 +636,30 @@ static int dm_test_fdt_translation(struct unit_test_state *uts)
 	fdt32_t dma_addr[2];
 
 	/* Some simple translations */
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 	ut_asserteq_str("dev at 0,0", dev->name);
 	ut_asserteq(0x8000, dev_read_addr(dev));
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 1, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 1, &dev));
 	ut_asserteq_str("dev at 1,100", dev->name);
 	ut_asserteq(0x9000, dev_read_addr(dev));
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 2, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 2, &dev));
 	ut_asserteq_str("dev at 2,200", dev->name);
 	ut_asserteq(0xA000, dev_read_addr(dev));
 
 	/* No translation for busses with #size-cells == 0 */
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 3, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 3, &dev));
 	ut_asserteq_str("dev at 42", dev->name);
 	ut_asserteq(0x42, dev_read_addr(dev));
 
 	/* dma address translation */
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 	dma_addr[0] = cpu_to_be32(0);
 	dma_addr[1] = cpu_to_be32(0);
 	ut_asserteq(0x10000000, dev_translate_dma_address(dev, dma_addr));
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 1, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 1, &dev));
 	dma_addr[0] = cpu_to_be32(1);
 	dma_addr[1] = cpu_to_be32(0x100);
 	ut_asserteq(0x20000000, dev_translate_dma_address(dev, dma_addr));
@@ -677,7 +677,7 @@ static int dm_test_fdt_get_addr_ptr_flat(struct unit_test_state *uts)
 	ut_assertok(uclass_first_device_err(UCLASS_GPIO, &gpio));
 	ut_assertnull(devfdt_get_addr_ptr(gpio));
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 	ptr = devfdt_get_addr_ptr(dev);
 	ut_asserteq_ptr((void *)0x8000, ptr);
 
@@ -692,7 +692,7 @@ static int dm_test_fdt_remap_addr_flat(struct unit_test_state *uts)
 	fdt_addr_t addr;
 	void *paddr;
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 
 	addr = devfdt_get_addr(dev);
 	ut_asserteq(0x8000, addr);
@@ -713,7 +713,7 @@ static int dm_test_fdt_remap_addr_index_flat(struct unit_test_state *uts)
 	fdt_size_t size;
 	void *paddr;
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 
 	addr = devfdt_get_addr_size_index(dev, 0, &size);
 	ut_asserteq(0x8000, addr);
@@ -735,7 +735,7 @@ static int dm_test_fdt_remap_addr_name_flat(struct unit_test_state *uts)
 	fdt_size_t size;
 	void *paddr;
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 
 	addr = devfdt_get_addr_size_name(dev, "sandbox-dummy-0", &size);
 	ut_asserteq(0x8000, addr);
@@ -756,7 +756,7 @@ static int dm_test_fdt_remap_addr_live(struct unit_test_state *uts)
 	fdt_addr_t addr;
 	void *paddr;
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 
 	addr = dev_read_addr(dev);
 	ut_asserteq(0x8000, addr);
@@ -777,7 +777,7 @@ static int dm_test_fdt_remap_addr_index_live(struct unit_test_state *uts)
 	fdt_size_t size;
 	void *paddr;
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 
 	addr = dev_read_addr_size_index(dev, 0, &size);
 	ut_asserteq(0x8000, addr);
@@ -799,7 +799,7 @@ static int dm_test_fdt_remap_addr_name_live(struct unit_test_state *uts)
 	fdt_size_t size;
 	void *paddr;
 
-	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, &dev));
 
 	addr = dev_read_addr_size_name(dev, "sandbox-dummy-0", &size);
 	ut_asserteq(0x8000, addr);
@@ -834,7 +834,7 @@ static int dm_test_fdt_livetree_writing(struct unit_test_state *uts)
 
 	device_bind_driver_to_node(dm_root(), "usb_sandbox", "usb at 2", node,
 				   &dev);
-	ut_assertok(uclass_find_device_by_seq(UCLASS_USB, 2, true, &dev));
+	ut_assertok(uclass_find_device_by_seq(UCLASS_USB, 2, &dev));
 
 	/* Test string property setting */
 
-- 
2.29.2.684.gfbc64c5ab5-goog

  parent reply	other threads:[~2020-12-17  4:20 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  4:20 [PATCH v3 00/28] dm: Change the way sequence numbers are implemented Simon Glass
2020-12-17  4:20 ` [PATCH v3 01/28] linker_lists: Fix alignment issue Simon Glass
2021-04-15  7:39   ` Heinrich Schuchardt
2021-04-21  7:14     ` Simon Glass
2020-12-17  4:20 ` [PATCH v3 02/28] dm: Avoid accessing seq directly Simon Glass
2020-12-17  4:20 ` [PATCH v3 03/28] dm: core: Update uclass_find_next_free_req_seq() args Simon Glass
2020-12-17  4:20 ` [PATCH v3 04/28] dm: core: Add a new sequence number for devices Simon Glass
2020-12-17  4:20 ` [PATCH v3 05/28] dm: test: Check all devices have a sequence numbers Simon Glass
2020-12-17  4:20 ` [PATCH v3 06/28] dm: core: Switch binding to use new " Simon Glass
2020-12-17  4:20 ` [PATCH v3 07/28] dm: Fix return value in dev_read_alias_seq() Simon Glass
2020-12-17  4:20 ` [PATCH v3 08/28] dm: test: Drop assumptions of no sequence numbers Simon Glass
2020-12-17  4:20 ` [PATCH v3 09/28] octeon: Don't attempt to set the sequence number Simon Glass
2020-12-17  4:20 ` [PATCH v3 10/28] i2c: Update for new sequence numbers Simon Glass
2020-12-17  4:20 ` [PATCH v3 11/28] net: Update to use " Simon Glass
2020-12-17  4:20 ` [PATCH v3 12/28] dm: core: Allow manual sequence numbering Simon Glass
2020-12-17  4:20 ` [PATCH v3 13/28] pci: Update to use new sequence numbers Simon Glass
2020-12-17  4:20 ` [PATCH v3 14/28] spi: Update for " Simon Glass
2020-12-17  4:20 ` [PATCH v3 15/28] usb: ehci-mx6: Drop assignment of sequence number Simon Glass
2020-12-17  4:20 ` [PATCH v3 16/28] usb: Update for new sequence numbers Simon Glass
2020-12-17  4:20 ` [PATCH v3 17/28] x86: Drop unnecessary mp_init logic Simon Glass
2020-12-17  4:20 ` [PATCH v3 18/28] x86: Simplify acpi_device_infer_name() Simon Glass
2020-12-17  4:20 ` [PATCH v3 19/28] gpio: Update for new sequence numbers Simon Glass
2020-12-17  4:20 ` [PATCH v3 20/28] pinctrl: " Simon Glass
2020-12-17  4:20 ` [PATCH v3 21/28] dm: Switch over to use new sequence number for dev_seq() Simon Glass
2020-12-17  4:20 ` [PATCH v3 22/28] dm: test: Add a test for DM_UC_FLAG_NO_AUTO_SEQ Simon Glass
2020-12-17  4:20 ` [PATCH v3 23/28] dm: Drop uclass_resolve_seq() Simon Glass
2020-12-17  4:20 ` Simon Glass [this message]
2020-12-17  4:20 ` [PATCH v3 25/28] dm: core: Update uclass_find_next_free_req_seq() for new scheme Simon Glass
2020-12-17  4:20 ` [PATCH v3 26/28] cmd: Drop use of old sequence numbers in commands Simon Glass
2020-12-17  4:20 ` [PATCH v3 27/28] dm: core: Drop seq and req_seq Simon Glass
2020-12-17  4:20 ` [PATCH v3 28/28] dm: Update documentation for new sequence numbers Simon Glass
2020-12-18 11:09 ` [PATCH v3 00/28] dm: Change the way sequence numbers are implemented Michael Walle
2020-12-19 16:40 ` [PATCH v3 28/28] dm: Update documentation for new sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 27/28] dm: core: Drop seq and req_seq Simon Glass
2020-12-19 16:40 ` [PATCH v3 25/28] dm: core: Update uclass_find_next_free_req_seq() for new scheme Simon Glass
2020-12-19 16:40 ` [PATCH v3 26/28] cmd: Drop use of old sequence numbers in commands Simon Glass
2020-12-19 16:40 ` [PATCH v3 24/28] dm: Drop the unused arg in uclass_find_device_by_seq() Simon Glass
2020-12-19 16:40 ` [PATCH v3 23/28] dm: Drop uclass_resolve_seq() Simon Glass
2020-12-19 16:40 ` [PATCH v3 22/28] dm: test: Add a test for DM_UC_FLAG_NO_AUTO_SEQ Simon Glass
2020-12-19 16:40 ` [PATCH v3 21/28] dm: Switch over to use new sequence number for dev_seq() Simon Glass
2020-12-19 16:40 ` [PATCH v3 20/28] pinctrl: Update for new sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 19/28] gpio: " Simon Glass
2020-12-19 16:40 ` [PATCH v3 18/28] x86: Simplify acpi_device_infer_name() Simon Glass
2020-12-19 16:40 ` [PATCH v3 17/28] x86: Drop unnecessary mp_init logic Simon Glass
2020-12-19 16:40 ` [PATCH v3 16/28] usb: Update for new sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 15/28] usb: ehci-mx6: Drop assignment of sequence number Simon Glass
2021-03-31 19:14   ` Marek Vasut
2021-03-31 19:27     ` Tom Rini
2021-03-31 22:20       ` Simon Glass
2020-12-19 16:40 ` [PATCH v3 14/28] spi: Update for new sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 13/28] pci: Update to use " Simon Glass
2021-04-13 18:32   ` Tim Harvey
2021-04-14 19:37     ` Simon Glass
2021-04-15  0:28       ` Tim Harvey
2021-04-15  0:44         ` Simon Glass
2020-12-19 16:40 ` [PATCH v3 12/28] dm: core: Allow manual sequence numbering Simon Glass
2020-12-19 16:40 ` [PATCH v3 11/28] net: Update to use new sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 10/28] i2c: Update for " Simon Glass
2020-12-19 16:40 ` [PATCH v3 09/28] octeon: Don't attempt to set the sequence number Simon Glass
2020-12-19 16:40 ` [PATCH v3 08/28] dm: test: Drop assumptions of no sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 07/28] dm: Fix return value in dev_read_alias_seq() Simon Glass
2020-12-19 16:40 ` [PATCH v3 06/28] dm: core: Switch binding to use new sequence numbers Simon Glass
2020-12-19 16:40 ` [PATCH v3 05/28] dm: test: Check all devices have a " Simon Glass
2020-12-19 16:40 ` [PATCH v3 04/28] dm: core: Add a new sequence number for devices Simon Glass
2020-12-19 16:40 ` [PATCH v3 03/28] dm: core: Update uclass_find_next_free_req_seq() args Simon Glass
2020-12-19 16:40 ` [PATCH v3 02/28] dm: Avoid accessing seq directly Simon Glass
2020-12-19 16:40 ` [PATCH v3 01/28] linker_lists: Fix alignment issue Simon Glass

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=20201217042034.411902-21-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.