linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/resctrl: fix the uninitialized variable warning
@ 2018-11-28 20:15 Moger, Babu
  2018-11-28 20:29 ` Borislav Petkov
  2018-12-18 11:51 ` [tip:x86/cache] x86/resctrl: Fix " tip-bot for MogerBabu
  0 siblings, 2 replies; 4+ messages in thread
From: Moger, Babu @ 2018-11-28 20:15 UTC (permalink / raw)
  To: tglx, mingo, bp
  Cc: hpa, x86, fenghua.yu, reinette.chatre, Moger, Babu,
	dan.carpenter, linux-kernel

Fix the compiler warning caused by a recent change.

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>
---
 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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH] x86/resctrl: fix the uninitialized variable warning
  2018-11-28 20:15 [PATCH] x86/resctrl: fix the uninitialized variable warning Moger, Babu
@ 2018-11-28 20:29 ` Borislav Petkov
  2018-11-28 20:35   ` Moger, Babu
  2018-12-18 11:51 ` [tip:x86/cache] x86/resctrl: Fix " tip-bot for MogerBabu
  1 sibling, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2018-11-28 20:29 UTC (permalink / raw)
  To: Moger, Babu
  Cc: tglx, mingo, hpa, x86, fenghua.yu, reinette.chatre,
	dan.carpenter, linux-kernel

On Wed, Nov 28, 2018 at 08:15:02PM +0000, Moger, Babu wrote:
> Fix the compiler warning caused by a recent change.

Now take your time machine, send yourself 6 months into the future, look
at that commit message and try to remember what it was fixing. Can you?

I can't.

IOW, please summarize what smatch - the static checker not the compiler
- was complaining about and why this is a good fix.

Thx.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

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

* RE: [PATCH] x86/resctrl: fix the uninitialized variable warning
  2018-11-28 20:29 ` Borislav Petkov
@ 2018-11-28 20:35   ` Moger, Babu
  0 siblings, 0 replies; 4+ messages in thread
From: Moger, Babu @ 2018-11-28 20:35 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: tglx, mingo, hpa, x86, fenghua.yu, reinette.chatre,
	dan.carpenter, linux-kernel

Boris,

> -----Original Message-----
> From: Borislav Petkov <bp@alien8.de>
> Sent: Wednesday, November 28, 2018 2:30 PM
> To: Moger, Babu <Babu.Moger@amd.com>
> Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com;
> x86@kernel.org; fenghua.yu@intel.com; reinette.chatre@intel.com;
> dan.carpenter@oracle.com; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] x86/resctrl: fix the uninitialized variable warning
> 
> On Wed, Nov 28, 2018 at 08:15:02PM +0000, Moger, Babu wrote:
> > Fix the compiler warning caused by a recent change.
> 
> Now take your time machine, send yourself 6 months into the future, look
> at that commit message and try to remember what it was fixing. Can you?
> 
> I can't.
> 
> IOW, please summarize what smatch - the static checker not the compiler
> - was complaining about and why this is a good fix.
Yes. Forgot to mention. Sent v2. I will mention about static checker in v3.

> 
> Thx.
> 
> --
> Regards/Gruss,
>     Boris.
> 
> Good mailing practices for 400: avoid top-posting and trim the reply.

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

* [tip:x86/cache] x86/resctrl: Fix the uninitialized variable warning
  2018-11-28 20:15 [PATCH] x86/resctrl: fix the uninitialized variable warning Moger, Babu
  2018-11-28 20:29 ` Borislav Petkov
@ 2018-12-18 11:51 ` tip-bot for MogerBabu
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for MogerBabu @ 2018-12-18 11:51 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Babu.Moger, reinette.chatre, mingo, babu.moger, dan.carpenter,
	tglx, hpa, fenghua.yu, linux-kernel, bp

Commit-ID:  0858ea05ee8b424e7776237b06bdfc7d6de0e014
Gitweb:     https://git.kernel.org/tip/0858ea05ee8b424e7776237b06bdfc7d6de0e014
Author:     MogerBabu <Babu.Moger@amd.com>
AuthorDate: Wed, 28 Nov 2018 20:15:02 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 18 Dec 2018 12:47:07 +0100

x86/resctrl: Fix the uninitialized variable warning

Fix the compiler warning caused by a recent change.

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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "bp@alien8.de" <bp@alien8.de>
Cc: "hpa@zytor.com" <hpa@zytor.com>
Cc: "fenghua.yu@intel.com" <fenghua.yu@intel.com>
Cc: "reinette.chatre@intel.com" <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20181128201450.31820-1-babu.moger@amd.com


---
 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 3b943ace786c..4b47ae76cccb 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);

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

end of thread, other threads:[~2018-12-18 11:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28 20:15 [PATCH] x86/resctrl: fix the uninitialized variable warning Moger, Babu
2018-11-28 20:29 ` Borislav Petkov
2018-11-28 20:35   ` Moger, Babu
2018-12-18 11:51 ` [tip:x86/cache] x86/resctrl: Fix " tip-bot for MogerBabu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).