]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/resctrl: Slightly clean-up mbm_config_show()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 13 Jul 2024 11:02:32 +0000 (13:02 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 14 Oct 2024 16:58:24 +0000 (18:58 +0200)
'mon_info' is already zeroed in the list_for_each_entry() loop below.  There
is no need to explicitly initialize it here. It just wastes some space and
cycles.

Remove this un-needed code.

On a x86_64, with allmodconfig:

  Before:
  ======
     text    data     bss     dec     hex filename
    74967    5103    1880   81950   1401e arch/x86/kernel/cpu/resctrl/rdtgroup.o

  After:
  =====
     text    data     bss     dec     hex filename
    74903    5103    1880   81886   13fde arch/x86/kernel/cpu/resctrl/rdtgroup.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/r/b2ebc809c8b6c6440d17b12ccf7c2d29aaafd488.1720868538.git.christophe.jaillet@wanadoo.fr
arch/x86/kernel/cpu/resctrl/rdtgroup.c

index d7163b764c626824b148c75bcd6a79ce9817ac9b..d906a1cd849178a9a4a6adedbd6f00f222b84c44 100644 (file)
@@ -1596,7 +1596,7 @@ static void mondata_config_read(struct rdt_mon_domain *d, struct mon_config_info
 
 static int mbm_config_show(struct seq_file *s, struct rdt_resource *r, u32 evtid)
 {
-       struct mon_config_info mon_info = {0};
+       struct mon_config_info mon_info;
        struct rdt_mon_domain *dom;
        bool sep = false;