Merge tag 'modules-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof...
[linux-block.git] / kernel / debug / kdb / kdb_main.c
index ead4da947127075e825c9085ff20d69a23046dd4..438b868cbfa9228fde28eb95375ec9b7218ff136 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/utsname.h>
 #include <linux/vmalloc.h>
 #include <linux/atomic.h>
-#include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/mm.h>
 #include <linux/init.h>
@@ -2060,54 +2059,6 @@ static int kdb_ef(int argc, const char **argv)
        return 0;
 }
 
-#if defined(CONFIG_MODULES)
-/*
- * kdb_lsmod - This function implements the 'lsmod' command.  Lists
- *     currently loaded kernel modules.
- *     Mostly taken from userland lsmod.
- */
-static int kdb_lsmod(int argc, const char **argv)
-{
-       struct module *mod;
-
-       if (argc != 0)
-               return KDB_ARGCOUNT;
-
-       kdb_printf("Module                  Size  modstruct     Used by\n");
-       list_for_each_entry(mod, kdb_modules, list) {
-               if (mod->state == MODULE_STATE_UNFORMED)
-                       continue;
-
-               kdb_printf("%-20s%8u  0x%px ", mod->name,
-                          mod->core_layout.size, (void *)mod);
-#ifdef CONFIG_MODULE_UNLOAD
-               kdb_printf("%4d ", module_refcount(mod));
-#endif
-               if (mod->state == MODULE_STATE_GOING)
-                       kdb_printf(" (Unloading)");
-               else if (mod->state == MODULE_STATE_COMING)
-                       kdb_printf(" (Loading)");
-               else
-                       kdb_printf(" (Live)");
-               kdb_printf(" 0x%px", mod->core_layout.base);
-
-#ifdef CONFIG_MODULE_UNLOAD
-               {
-                       struct module_use *use;
-                       kdb_printf(" [ ");
-                       list_for_each_entry(use, &mod->source_list,
-                                           source_list)
-                               kdb_printf("%s ", use->target->name);
-                       kdb_printf("]\n");
-               }
-#endif
-       }
-
-       return 0;
-}
-
-#endif /* CONFIG_MODULES */
-
 /*
  * kdb_env - This function implements the 'env' command.  Display the
  *     current environment variables.