[PATCH v2] mtd: sm_ftl: replace strncpy with memcpy
Pratyush Yadav
pratyush at kernel.org
Tue Sep 9 04:27:04 PDT 2025
Hi Rahul,
On Mon, Sep 08 2025, Rahul Kumar wrote:
> Replace strncpy with memcpy in sm_attr_show and explicitly add a NUL
> terminator after the copy. Also update the return value to reflect the
> extra byte written for the terminator. This aligns with current kernel
> best practices as strncpy is deprecated for such use, as explained in
> Documentation/process/deprecated.rst.
>
> No functional change, only cleanup for consistency.
>
> Suggested-by: Pratyush Yadav <pratyush at kernel.org>
A Suggested-by tag indicates that the patch idea was suggested by that
person. In this case, I did not suggest this patch and merely reviewed
it. So a Suggested-by is slightly odd here. You can read more about the
tags here:
https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes
[...]
--
Regards,
Pratyush Yadav
More information about the linux-mtd
mailing list