Re: [PATCH v4 11/12] EDAC/ghes: Small buffer fixes for mem other_detail helpers

From: Borislav Petkov

Date: Mon Nov 23 2026 - 23:31:29 EST


On Fri, Nov 13, 2026 at 02:24:53PM +0100, Pierre Gondois wrote:
> scnprintf() already reserves space for the terminating NULL,
> leaving one byte unused and under-flowing the capacity when len=0.
> Callers also remove the last character unconditionally, which
> can discard valid text after truncation.
>
> Update the following functions to fix the above issues.
> - print_mem_error_other_detail()
> - print_mem_error2_other_detail()
>
> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
> ---
> drivers/edac/ghes_edac.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)


Fixes go *first* in a patchset. Then you don't have to fix a function you just
added in your patchset.

Also, the patch subject should have a verb.

Also, those functions you're touching here look to me like they're duplicating
a bunch of code...

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette