mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] x86/resctrl: fix the uninitialized variable warning
@ 2018-11-28 20:31 Moger, Babu
  0 siblings, 0 replies; only message in thread
From: Moger, Babu @ 2018-11-28 20:31 UTC (permalink / raw)
  To: tglx, mingo, bp
  Cc: hpa, x86, fenghua.yu, reinette.chatre, Moger, Babu,
	dan.carpenter, linux-kernel

Fix the following compiler warning caused by recent change.

arch/x86/kernel/cpu/resctrl/ctrlmondata.c:227 parse_cbm()
error: uninitialized symbol 'cbm_val'

Fixes: a36c5ff560fb ("x86/resctrl: Bring cbm_validate() into the resource structure")

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
---
 v1->v2
 Added the actual warning.

 arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
index 03ee13235a45..2477cb196735 100644
--- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
+++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
@@ -202,7 +202,7 @@ int parse_cbm(struct rdt_parse_data *data, struct rdt_resource *r,
 	      struct rdt_domain *d)
 {
 	struct rdtgroup *rdtgrp = data->rdtgrp;
-	u32 cbm_val;
+	u32 cbm_val = 0;
 
 	if (d->have_new_ctrl) {
 		rdt_last_cmd_printf("Duplicate domain %d\n", d->id);
-- 
2.17.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-28 20:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28 20:31 [PATCH v2] x86/resctrl: fix the uninitialized variable warning Moger, Babu

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®