trace: code optimization
Subsystems (2)
PATCH 1/1 trace: code optimization
In reply to a message not in the archiveuse scnprintf instead of snprinr and no need to check the return size again
--- kernel/trace/trace_stack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/trace/trace_stack.c +1 -3
@@ -329,9 +329,7 @@ stack_max_size_read(struct file *filp, char __user *ubuf,char buf[64 ];int r; - r =snprintf (buf,sizeof (buf),"%ld\n" , *ptr); -if (r >sizeof (buf)) - r =sizeof (buf); + r =scnprintf (buf,sizeof (buf),"%ld\n" , *ptr);return simple_read_from_buffer (ubuf, count, ppos, buf, r); }
Signature · 1 line
2.7.4
Quoted 1 line
use scnprintf instead of snprinr and no need to check
Will a typo be avoided in the final change description?
Quoted 1 line
Signed-off-by liuyang34 …
Will this information need also an adjustment for the desired specification of a real name?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=b07f636fca1c8fbba124b0082487c0b3890a0e0c#n458
Regards,
Markus
Steven Rostedt
maintainerQuoted 11 lines · On Thu, 9 Jan 2020 14:16:46 +0100 Markus Elfring <[email protected]> wrote:
Quoted 1 line
use scnprintf instead of snprinr and no need to check
Will a typo be avoided in the final change description?
Quoted 1 line
Signed-off-by liuyang34 …Will this information need also an adjustment for the desired specification of a real name?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id°7f636fca1c8fbba124b0082487c0b3890a0e0c#n458
Correct. Please resend the patch with the typo fix and a real name for the Signed-off-by.
Thanks!
-- Steve