From: Borislav Petkov <bp@alien8.de>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: Babu Moger <babu.moger@amd.com>,
corbet@lwn.net, fenghua.yu@intel.com, tglx@linutronix.de,
mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com, paulmck@kernel.org, rdunlap@infradead.org,
tj@kernel.org, peterz@infradead.org, yanjiewtw@gmail.com,
kim.phillips@amd.com, lukas.bulwahn@gmail.com, seanjc@google.com,
jmattson@google.com, leitao@debian.org, jpoimboe@kernel.org,
rick.p.edgecombe@intel.com, kirill.shutemov@linux.intel.com,
jithu.joseph@intel.com, kai.huang@intel.com,
kan.liang@linux.intel.com, daniel.sneddon@linux.intel.com,
pbonzini@redhat.com, sandipan.das@amd.com,
ilpo.jarvinen@linux.intel.com, peternewman@google.com,
maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, eranian@google.com
Subject: Re: [PATCH] x86/resctrl: Fix unneeded variable warning reported by kernel test robot
Date: Wed, 24 Jan 2024 19:31:53 +0100 [thread overview]
Message-ID: <20240124183153.GFZbFXmTKTLEpwZshW@fat_crate.local> (raw)
In-Reply-To: <39c4501e-4937-49de-b12b-742e6201df6f@intel.com>
On Wed, Jan 24, 2024 at 10:25:17AM -0800, Reinette Chatre wrote:
> This can be confusing since it implies that the patch you mention
> introduces the issue but instead the variable has been unneeded since
> the original:
> 92bd5a139033 ("x86/resctrl: Add interface to write mbm_total_bytes_config")
What I said. :)
> To help clarify you can mention this order of events and also add an
> appropriate "Fixes:" tag.
>
> > cocci warnings: (new ones prefixed by >>)
> >>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:1621:5-8: Unneeded variable: "ret". Return " 0" on line 1655
> >
> > Fix the warning by removing the variable "ret" and returning 0 directly.
>
> cocci warning was spot on*. This fix is not just a change to "make a
> warning go away" but instead fixing an actual problem.
> It can just be "Remove the unneeded variable and return 0 directly".
I'll fix all up before applying.
> * I'll add a private setup with the goal to catch these earlier.
Except that it doesn't fire with the patch that added the code. It looks
like the cocci script needs adjustment...
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2024-01-24 18:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 10:31 [tip:x86/cache 3/3] arch/x86/kernel/cpu/resctrl/rdtgroup.c:1621:5-8: Unneeded variable: "ret". Return " 0" on line 1655 kernel test robot
2024-01-24 10:55 ` Borislav Petkov
2024-01-24 14:58 ` Moger, Babu
2024-01-24 16:00 ` Borislav Petkov
2024-01-24 17:52 ` [PATCH] x86/resctrl: Fix unneeded variable warning reported by kernel test robot Babu Moger
2024-01-24 18:25 ` Reinette Chatre
2024-01-24 18:31 ` Borislav Petkov [this message]
2024-01-24 18:51 ` Reinette Chatre
2024-01-24 19:14 ` Borislav Petkov
2024-01-24 19:39 ` Moger, Babu
2024-01-24 20:48 ` Borislav Petkov
2024-01-24 20:04 ` Reinette Chatre
2024-01-24 20:45 ` Borislav Petkov
2024-01-24 21:31 ` Reinette Chatre
2024-01-24 22:46 ` Borislav Petkov
2024-01-24 23:03 ` Reinette Chatre
2024-01-24 23:34 ` Borislav Petkov
2024-01-24 23:41 ` Borislav Petkov
2024-01-25 0:12 ` Reinette Chatre
2024-01-24 23:50 ` [tip: x86/cache] x86/resctrl: Remove redundant variable in mbm_config_write_domain() tip-bot2 for Babu Moger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240124183153.GFZbFXmTKTLEpwZshW@fat_crate.local \
--to=bp@alien8.de \
--cc=babu.moger@amd.com \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jithu.joseph@intel.com \
--cc=jmattson@google.com \
--cc=jpoimboe@kernel.org \
--cc=kai.huang@intel.com \
--cc=kan.liang@linux.intel.com \
--cc=kim.phillips@amd.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=maciej.wieczor-retman@intel.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peternewman@google.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=rick.p.edgecombe@intel.com \
--cc=sandipan.das@amd.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=x86@kernel.org \
--cc=yanjiewtw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®