All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dm: core: Correct references to DM_SPL
@ 2023-09-20  2:05 Simon Glass
  2023-09-20  2:05 ` [PATCH 2/2] dm: core: Adjust dump-sorting to get stats only when needed Simon Glass
  2023-10-04 17:58 ` Simon Glass
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Glass @ 2023-09-20  2:05 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Simon Glass, Jaehoon Chung, Marek Vasut, Mayuresh Chitale,
	Pavel Herrmann, Tobias Waldekranz

This does not existing anymore. Update the two in-tree uses of it to the
correct Kconfig option, which is SPL_DM

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

Changes in v2:
- Add new patch to correct references to DM_SPL

 drivers/block/Kconfig | 2 +-
 drivers/core/Kconfig  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 1abea3f10db4..ef41aba03555 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -13,7 +13,7 @@ config BLK
 
 config SPL_LEGACY_BLOCK
 	bool # "Enable Legacy Block Device"
-	depends on SPL && !DM_SPL
+	depends on SPL && !SPL_DM
 	default y if SPL_MMC || SPL_USB_STORAGE || SCSI || NVME || IDE
 	default y if SPL_AHCI_PCI
 	help
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index f0d848f45d8e..6c287c68a1c2 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -88,7 +88,7 @@ config DM_STATS
 
 config SPL_DM_STATS
 	bool "Collect and show driver model stats in SPL"
-	depends on DM_SPL
+	depends on SPL_DM
 	help
 	  Enable this to collect and display memory statistics about driver
 	  model. This can help to figure out where all the memory is going and
-- 
2.42.0.459.ge4e396fd5e-goog


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

* [PATCH 2/2] dm: core: Adjust dump-sorting to get stats only when needed
  2023-09-20  2:05 [PATCH 1/2] dm: core: Correct references to DM_SPL Simon Glass
@ 2023-09-20  2:05 ` Simon Glass
  2023-10-04 17:58 ` Simon Glass
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2023-09-20  2:05 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: Simon Glass, Marek Vasut, Pavel Herrmann

If we are not sorting the tree we don't need to get the stats. Adjust the
code to avoid the wasted time.

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

(no changes since v1)

 drivers/core/dump.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index 3e77832a3a00..bf95c0f52379 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -91,14 +91,14 @@ void dm_dump_tree(bool sort)
 
 	root = dm_root();
 	if (root) {
-		int dev_count, uclasses;
 		struct udevice **devs = NULL;
 
-		dm_get_stats(&dev_count, &uclasses);
-
 		printf(" Class     Index  Probed  Driver                Name\n");
 		printf("-----------------------------------------------------------\n");
 		if (sort) {
+			int dev_count, uclasses;
+
+			dm_get_stats(&dev_count, &uclasses);
 			devs = calloc(dev_count, sizeof(struct udevice *));
 			if (!devs) {
 				printf("(out of memory)\n");
-- 
2.42.0.459.ge4e396fd5e-goog


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

* Re: [PATCH 2/2] dm: core: Adjust dump-sorting to get stats only when needed
  2023-09-20  2:05 [PATCH 1/2] dm: core: Correct references to DM_SPL Simon Glass
  2023-09-20  2:05 ` [PATCH 2/2] dm: core: Adjust dump-sorting to get stats only when needed Simon Glass
@ 2023-10-04 17:58 ` Simon Glass
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2023-10-04 17:58 UTC (permalink / raw)
  To: Simon Glass; +Cc: Marek Vasut, Pavel Herrmann, U-Boot Mailing List

If we are not sorting the tree we don't need to get the stats. Adjust the
code to avoid the wasted time.

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

(no changes since v1)

 drivers/core/dump.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!

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

end of thread, other threads:[~2023-10-04 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-20  2:05 [PATCH 1/2] dm: core: Correct references to DM_SPL Simon Glass
2023-09-20  2:05 ` [PATCH 2/2] dm: core: Adjust dump-sorting to get stats only when needed Simon Glass
2023-10-04 17:58 ` Simon Glass

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.