Re: [PATCH v2] params: bound array element output to the caller's page buffer
From: Pengpeng Hou
Date: Wed May 20 2026 - 22:31:30 EST
Hi Petr,
You're right, that changelog bullet was misleading.
v1 already broke out of the loop once off reached PAGE_SIZE - 1, so it
would not enter another iteration with no remaining byte in the caller's
page buffer.
The v2 change was narrower: after the element getter returns, it clamps
the number of bytes to copy and only rewrites the previous '\n' separator
when that clamped length is non-zero. That avoids turning the previous
separator into ',' when the next element contributes no visible bytes
after clamping, or if a getter returns 0.
The bullet should have said:
- avoid rewriting the previous separator when no bytes are copied from
the next element
The code change itself still matches that behavior. I can resend with
the changelog corrected if preferred.
Thanks,
Pengpeng