Re: [PATCH] ALSA: hda: Add hda_append_suffix() local helper
Takashi Iwai <[email protected]> Fri, 31 Jul 2026 08:40:32 +0200
| Newsgroups | org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 30 Jul 2026 19:55:55 +0200, Ian Bridges wrote: > > On Thu, Jul 30, 2026 at 06:14:03PM +0200, Takashi Iwai wrote: > > As strlcat() shall be deprecated in future, provide an alternative > > just for a simple purpose -- append a suffix string to the given > > string buffer -- and use it at appropriate places. The code isn't > > really efficient, but we don't ask for speed here, so let it be. > > The patch was tested as follows: > - Applied on today's for-next (f817bac425c5) on top of the two jack > name cleanup patches. W=1 build of sound/hda/, no new warnings. > > - A userspace harness compared hda_append_suffix() against > both the kernel strlcat() and the strncat() form in jack.c, > exhaustively over buffer sizes, fill levels and suffix > lengths, comparing every byte of the buffer. All cases > were byte identical, including truncation. > > - A QEMU boot with intel-hda and hda-duplex, comparing the PCM > stream names, the codec proc dump and the full control > element list between base and patched kernels. The captures > were byte identical. > > Ian > > Reviewed-by: Ian Bridges <[email protected]> > Tested-by: Ian Bridges <[email protected]> Thanks for checking. Applied now to for-next branch. Takashi