Re: [PATCH 1/4] selftests/resctrl: Change initialize_llc_perf() return type to void

From: Reinette Chatre
Date: Mon Feb 13 2023 - 19:59:25 EST


Hi Ilpo,

On 2/8/2023 1:40 AM, Ilpo Järvinen wrote:
> initialize_llc_perf() unconditionally does return 0 so no point in
> having it's return type as int. Hence, change it's return type from int
> to void.
>

Thank you very much for contributing to resctrl. As a new resctrl
contributor I would like to share that resctrl follows the x86
style guidance and to be consistent this is for the most part
true for the resctrl selftest area.

To that point, changelogs are easier to read if the context, problem,
and solution are clearly separated by placing them in separate
paragraphs. See "Changelog" in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/maintainer-tip.rst

Please compare to a changelog as follows:

"
initialize_llc_perf() unconditionally returns 0.

initialize_llc_perf() performs memory initialization, none of
which can fail.

Change the return type from int to void to accurately
reflect that there is no checking of return value needed.
"

For such a small change as this, the changelog could possibly be
simplified but the context, problem, and solution should always
be clear to the reader. This may be significant changelog feedback
for such a small change. This is because it is your first patch to
this area and my goal is to point out the style that will help
your future resctrl contributions to have the pattern that
x86 maintainers expect.

Reinette