diff options
| author | Bill Wendling <morbo@google.com> | 2026-09-26 23:00:00 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-10-13 15:53:52 +0200 |
| commit | 6b795870cf764379a4631b99c3c20dadc206c064 (patch) | |
| tree | 9707b557b2f9dd4eefbc080a7678d7abf826e498 /tools/lib/python/kdoc/python_version.py | |
| parent | 471ce96a9c415b8a67bd5081ac2089a458cacc2f (diff) | |
comedi: comedi_bond: Refactor strlcat() to seq_buf in do_dev_config()
do_dev_config() builds a space-separated list of bonded devices in
devpriv->name by formatting each "minor:subdev " pair into a temporary
stack buffer with snprintf() and appending it with strlcat() in a loop.
In preparation for removing the deprecated strlcat() API[1], use struct
seq_buf and seq_buf_printf() to format each entry directly into
devpriv->name. This avoids repeated rescanning of devpriv->name and
eliminates the temporary buffer.
Link: https://github.com/KSPP/linux/issues/370 [1]
Cc: codemender-patching+linux@google.com
Assisted-by: LLM
Signed-off-by: Bill Wendling <morbo@google.com>
Signed-off-by: Mariia Nikitash <nikitash.mariiaw@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20260927060000.518354-1-nikitash.mariiaw@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
