diff mbox series

[2/3] depmod: Do not duplicate builtin index

Message ID 20220211084230.4489-2-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/3] libkmod: Prefer builtin index over builtin.alias | expand

Commit Message

Lucas De Marchi Feb. 11, 2022, 8:42 a.m. UTC
Now that libkmod uses modules.builtin.bin again, we don't need to add
the module names in modules.builtin.alias.bin and just add the aliases.

After this change, here are the new sizes for the indexes:

Before	After	index
21k	6.4K	modules.builtin.alias.bin
11k	 11K	modules.builtin.bin
---
 tools/depmod.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/depmod.c b/tools/depmod.c
index eb810b8..ac6ead8 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2405,7 +2405,7 @@  static int output_devname(struct depmod *depmod, FILE *out)
 
 static int output_builtin_alias_bin(struct depmod *depmod, FILE *out)
 {
-	int ret = 0, count = 0;
+	int ret = 0;
 	struct index_node *idx;
 	struct kmod_list *l, *builtin = NULL;
 
@@ -2450,9 +2450,6 @@  static int output_builtin_alias_bin(struct depmod *depmod, FILE *out)
 		}
 
 		kmod_module_info_free_list(info_list);
-
-		index_insert(idx, modname, modname, 0);
-		count++;
 	}
 
 out: