mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/resctrl: Slightly clean-up mbm_config_show()
@ 2024-07-13 11:02 Christophe JAILLET
  2024-07-16 15:39 ` Reinette Chatre
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2024-07-13 11:02 UTC (permalink / raw)
  To: Fenghua Yu, Reinette Chatre, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

'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>
---
 arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
index d7163b764c62..d906a1cd8491 100644
--- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
+++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
@@ -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;
 
-- 
2.45.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/resctrl: Slightly clean-up mbm_config_show()
  2024-07-13 11:02 [PATCH] x86/resctrl: Slightly clean-up mbm_config_show() Christophe JAILLET
@ 2024-07-16 15:39 ` Reinette Chatre
  0 siblings, 0 replies; 2+ messages in thread
From: Reinette Chatre @ 2024-07-16 15:39 UTC (permalink / raw)
  To: Christophe JAILLET, Fenghua Yu, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
  Cc: linux-kernel, kernel-janitors

Hi Christophe,

On 7/13/24 4:02 AM, Christophe JAILLET wrote:
> '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>
> ---

Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>

Thank you.

Reinette

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-16 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-13 11:02 [PATCH] x86/resctrl: Slightly clean-up mbm_config_show() Christophe JAILLET
2024-07-16 15:39 ` Reinette Chatre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®