All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: linux-modules@vger.kernel.org
Cc: Luis Chamberlain <mcgrof@kernel.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH 1/4] modprobe: Rename rmmod_do_deps_list
Date: Tue, 29 Mar 2022 02:05:35 -0700	[thread overview]
Message-ID: <20220329090540.38255-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20220329090540.38255-1-lucas.demarchi@intel.com>

It's used not only for dependencies, but also for pre and post softdep.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 tools/modprobe.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/modprobe.c b/tools/modprobe.c
index 9387537..eed951f 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -357,7 +357,8 @@ static int rmmod_do_remove_module(struct kmod_module *mod)
 #define RMMOD_FLAG_IGNORE_BUILTIN	0x2
 static int rmmod_do_module(struct kmod_module *mod, int flags);
 
-static int rmmod_do_deps_list(struct kmod_list *list, bool stop_on_errors)
+/* Remove modules in reverse order */
+static int rmmod_do_modlist(struct kmod_list *list, bool stop_on_errors)
 {
 	struct kmod_list *l;
 
@@ -413,12 +414,12 @@ static int rmmod_do_module(struct kmod_module *mod, int flags)
 		}
 	}
 
-	rmmod_do_deps_list(post, false);
+	rmmod_do_modlist(post, false);
 
 	if ((flags & RMMOD_FLAG_DO_DEPENDENCIES) && remove_dependencies) {
 		struct kmod_list *deps = kmod_module_get_dependencies(mod);
 
-		err = rmmod_do_deps_list(deps, true);
+		err = rmmod_do_modlist(deps, true);
 		if (err < 0)
 			goto error;
 	}
@@ -443,7 +444,7 @@ static int rmmod_do_module(struct kmod_module *mod, int flags)
 	if (err < 0)
 		goto error;
 
-	rmmod_do_deps_list(pre, false);
+	rmmod_do_modlist(pre, false);
 
 error:
 	kmod_module_unref_list(pre);
-- 
2.35.1


  reply	other threads:[~2022-03-29  9:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29  9:05 [PATCH 0/4] modprobe -r fixes and refactors Lucas De Marchi
2022-03-29  9:05 ` Lucas De Marchi [this message]
2022-03-29 19:37   ` [PATCH 1/4] modprobe: Rename rmmod_do_deps_list Luis Chamberlain
2022-03-29  9:05 ` [PATCH 1/4] modprobe: rename rmmod_do_deps_list Lucas De Marchi
2022-03-29  9:05 ` [PATCH 2/4] modprobe: Fix holders removal Lucas De Marchi
2022-04-06 22:20   ` Luis Chamberlain
2022-03-29  9:05 ` [PATCH 3/4] modprobe: Move check for remove_holders to caller Lucas De Marchi
2022-04-06 22:21   ` Luis Chamberlain
2022-03-29  9:05 ` [PATCH 3/4] modprobe: move " Lucas De Marchi
2022-03-29  9:05 ` [PATCH 4/4] modprobe: Make rmmod_do_module() contain all the removal sequence Lucas De Marchi
2022-04-06 22:22   ` Luis Chamberlain
2022-04-07  5:05     ` Lucas De Marchi
2022-03-29  9:09 ` [PATCH 0/4] modprobe -r fixes and refactors Lucas De Marchi

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=20220329090540.38255-2-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=linux-modules@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /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.