Re: [PATCH] net: qualcomm: emac: replace strcpy() with strscpy()

From: Jakub Kicinski

Date: Tue Jun 09 2026 - 21:39:52 EST


On Sun, 7 Jun 2026 15:44:23 +0000 Hungyu Lin wrote:
> Replace strcpy() with strscpy() in emac_get_strings().
>
> strscpy() is the preferred string copy helper in the kernel and
> provides better bounds checking semantics.

strcpy() on a literal falls under pointless cleanups, IMO:

Quoting documentation:

Clean-up patches
~~~~~~~~~~~~~~~~

Netdev discourages patches which perform simple clean-ups, which are not in
the context of other work. For example:

* Addressing ``checkpatch.pl``, and other trivial coding style warnings
* Addressing :ref:`Local variable ordering<rcs>` issues
* Conversions to device-managed APIs (``devm_`` helpers)

This is because it is felt that the churn that such changes produce comes
at a greater cost than the value of such clean-ups.

Conversely, spelling and grammar fixes are not discouraged.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches