Re: [PATCH 0/4] Add scnprintf_append() helper
From: Andy Shevchenko
Date: Fri Nov 07 2025 - 03:15:48 EST
On Fri, Nov 07, 2025 at 01:16:12PM +0800, Junrui Luo wrote:
> This patch series was suggested by Takashi Iwai:
> https://lore.kernel.org/all/874irai0ag.wl-tiwai@xxxxxxx/
>
> It introduces a generic scnprintf_append() helper function
> to lib/vsprintf.c and converts several users across different subsystems.
>
> The pattern of building strings incrementally using strlen() + sprintf/snprintf()
> appears frequently throughout the kernel. This helper simplifies such code,
> and provides proper bounds checking.
>
> Patch 1 adds the scnprintf_append() helper to the kernel's string library.
> This is a common pattern where strings are built incrementally by appending
> formatted text.
>
> Patches 2-4 convert users in different subsystems:
> - Patch 2: sound/isa/wavefront
> - Patch 3: drivers/media/pci/ivtv
> - Patch 4: drivers/net/ethernet/qlogic/qede
>
> These conversions demonstrate the helper's applicability.
Something seems went wrong. This email is detached from the series (in terms of
the email thread). When formatting patches, use -v<X> --cover-letter to set
up the version number <X> and generate the cover letter that is chained to
the rest of the series.
--
With Best Regards,
Andy Shevchenko