Re: [PATCH v2 05/15] serial: core: replace snprintf with more robust scnprintf

From: Andy Shevchenko

Date: Mon May 04 2026 - 12:04:08 EST


On Mon, May 04, 2026 at 11:27:12AM -0400, Hugo Villeneuve wrote:
> On Thu, 30 Apr 2026 17:07:11 +0200
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> > On Tue, Apr 28, 2026 at 01:53:51PM -0400, Hugo Villeneuve wrote:

...

> > > default:
> > > strscpy(address, "*unknown*", sizeof(address));
> >
> > Side note: This may use 2-argument strscpy().
>
> This section is now removed in patch:
> serial: core: use uart_iotype_*() to simplify uart_report_port()
>
> But interesting to know this 2-argument variant :)

Yep, we have a handful of functions (actually macros) that use some magic
to allow supply different number of arguments to the same macro and behave
accordingly.

--
With Best Regards,
Andy Shevchenko