All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	neil.armstrong@linaro.org, Jonas Karlman <jonas@kwiboo.se>,
	Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>,
	Caleb Connolly <caleb.connolly@linaro.org>,
	Janne Grunau <j@jannau.net>, Leo <ycliang@andestech.com>,
	Marek Vasut <marex@denx.de>,
	Matthew Garrett <mgarrett@aurora.tech>,
	Pavel Herrmann <morpheus.ibis@gmail.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Rick Chen <rick@andestech.com>,
	Sughosh Ganu <sughosh.ganu@linaro.org>
Subject: [PATCH v2 4/4] dm: core: Rename dm_remove_devices_active()
Date: Mon,  7 Apr 2025 13:35:10 +1200	[thread overview]
Message-ID: <20250407013513.638110-5-sjg@chromium.org> (raw)
In-Reply-To: <20250407013513.638110-1-sjg@chromium.org>

This function doesn't have a great name, since we talk of devices being
active once they are probed.

Rename it to dm_remove_dma_devices().

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
---

(no changes since v1)

 arch/arm/lib/bootm.c          | 4 ++--
 arch/riscv/lib/bootm.c        | 2 +-
 arch/x86/lib/bootm.c          | 2 +-
 drivers/core/root.c           | 2 +-
 include/dm/root.h             | 6 +++---
 lib/efi_loader/efi_boottime.c | 2 +-
 test/dm/core.c                | 2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 688c2f3f29b..ef859a2cd4c 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -74,10 +74,10 @@ static void announce_and_cleanup(int fake)
 	 * Call remove function of all devices with a removal flag set.
 	 * This may be useful for last-stage operations, like cancelling
 	 * of DMA operation or releasing device internal buffers.
-	 * dm_remove_devices_active() ensures that vital devices are removed in
+	 * dm_remove_dma_devices() ensures that vital devices are removed in
 	 * a second round.
 	 */
-	dm_remove_devices_active();
+	dm_remove_dma_devices();
 
 	cleanup_before_linux();
 }
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 76c610bcee0..9aecaafef43 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -57,7 +57,7 @@ static void announce_and_cleanup(int fake)
 	 * This may be useful for last-stage operations, like cancelling
 	 * of DMA operation or releasing device internal buffers.
 	 */
-	dm_remove_devices_active();
+	dm_remove_dma_devices();
 
 	cleanup_before_linux();
 }
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 3c420b00936..91e8de4e1ad 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -50,7 +50,7 @@ void bootm_announce_and_cleanup(void)
 	 * This may be useful for last-stage operations, like cancelling
 	 * of DMA operation or releasing device internal buffers.
 	 */
-	dm_remove_devices_active();
+	dm_remove_dma_devices();
 }
 
 #if defined(CONFIG_OF_LIBFDT) && !defined(CONFIG_OF_NO_KERNEL)
diff --git a/drivers/core/root.c b/drivers/core/root.c
index c7fb58285ca..101cc4d43fa 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -148,7 +148,7 @@ int dm_remove_devices_flags(uint flags)
 	return 0;
 }
 
-void dm_remove_devices_active(void)
+void dm_remove_dma_devices(void)
 {
 	/* Remove non-vital devices first */
 	device_remove(dm_root(), DM_REMOVE_ACTIVE_ALL | DM_REMOVE_NON_VITAL);
diff --git a/include/dm/root.h b/include/dm/root.h
index 5651b868c8b..39a069cd465 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -169,16 +169,16 @@ int dm_uninit(void);
 int dm_remove_devices_flags(uint flags);
 
 /**
- * dm_remove_devices_active - Call remove function of all active drivers heeding
+ * dm_remove_dma_devices - Call remove function of all active drivers heeding
  *                            device dependencies as far as know, i.e. removing
  *                            devices marked with DM_FLAG_VITAL last.
  *
  * All active devices will be removed
  */
-void dm_remove_devices_active(void);
+void dm_remove_dma_devices(void);
 #else
 static inline int dm_remove_devices_flags(uint flags) { return 0; }
-static inline void dm_remove_devices_active(void) { }
+static inline void dm_remove_dma_devices(void) { }
 #endif
 
 /**
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index e525662f82f..8f78fcdf7c8 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -2281,7 +2281,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
 		if (IS_ENABLED(CONFIG_USB_DEVICE))
 			udc_disconnect();
 		board_quiesce_devices();
-		dm_remove_devices_active();
+		dm_remove_dma_devices();
 	}
 
 out:
diff --git a/test/dm/core.c b/test/dm/core.c
index 959b834576f..1194e3250b5 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -1057,7 +1057,7 @@ static int dm_test_remove_active(struct unit_test_state *uts)
 	ut_asserteq(true, device_active(dma_vital));
 
 	/* Remove active devices in an ordered way */
-	dm_remove_devices_active();
+	dm_remove_dma_devices();
 
 	/* Check that all devices are inactive right now */
 	ut_asserteq(true, device_active(normal));
-- 
2.43.0


  parent reply	other threads:[~2025-04-07  1:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07  1:35 [PATCH v2 0/4] dm: net: Assorted patches related to networking and DMA Simon Glass
2025-04-07  1:35 ` [PATCH v2 1/4] designware: Use the remove() method with related drivers Simon Glass
2025-04-07  7:31   ` neil.armstrong
2025-04-07  1:35 ` [PATCH v2 2/4] net: designware: Mark drivers as having active DMA Simon Glass
2025-04-07  7:31   ` neil.armstrong
2025-04-07  1:35 ` [PATCH v2 3/4] efi_loader: Move device-removal later in exit-boot-services Simon Glass
2025-04-07  7:54   ` Heinrich Schuchardt
2025-04-07 10:49     ` Simon Glass
2025-04-07 12:22       ` Mark Kettenis
2025-04-07  1:35 ` Simon Glass [this message]
2025-04-07  7:56   ` [PATCH v2 4/4] dm: core: Rename dm_remove_devices_active() Heinrich Schuchardt
2025-04-07 10:49     ` Simon Glass
2025-04-07 13:30       ` Tom Rini
2025-04-07 15:23         ` 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=20250407013513.638110-5-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=caleb.connolly@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=j@jannau.net \
    --cc=jonas@kwiboo.se \
    --cc=marex@denx.de \
    --cc=mgarrett@aurora.tech \
    --cc=morpheus.ibis@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=quentin.schulz@cherry.de \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=rick@andestech.com \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.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 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.