From: Jonathan Corbet <corbet@lwn.net>
To: NitinGote <nitin.r.gote@intel.com>
Cc: joe@perches.com, akpm@linux-foundation.org, apw@canonical.com,
keescook@chromium.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] Added warnings in checkpatch.pl script to :
Date: Tue, 9 Jul 2019 09:58:07 -0600 [thread overview]
Message-ID: <20190709095807.72adb380@lwn.net> (raw)
In-Reply-To: <20190709154806.26363-1-nitin.r.gote@intel.com>
On Tue, 9 Jul 2019 21:18:06 +0530
NitinGote <nitin.r.gote@intel.com> wrote:
> From: Nitin Gote <nitin.r.gote@intel.com>
>
> 1. Deprecate strcpy() in favor of strscpy().
> 2. Deprecate strlcpy() in favor of strscpy().
> 3. Deprecate strncpy() in favor of strscpy() or strscpy_pad().
>
> Updated strncpy() section in Documentation/process/deprecated.rst
> to cover strscpy_pad() case.
>
> Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
> ---
> Change log:
> v1->v2
> - For string related apis, created different %deprecated_string_api
> and these will get emitted at CHECK Level using command line option
> -f/--file to avoid bad patched from novice script users.
>
> v2->v3
> - Avoided use of $check in implementation.
> - Incorporated trivial comments.
>
> v3->v4
> - Incorporated comment by removing "c:func:"
But you ignored the comment asking for a proper subject line on the
patch.
Also,
> -only NUL-terminated strings. The safe replacement is :c:func:`strscpy`.
> -(Users of :c:func:`strscpy` still needing NUL-padding will need an
> -explicit :c:func:`memset` added.)
> +only NUL-terminated strings. In this case, the safe replacement is
> +`strscpy()`. If, however, the destination buffer still needs NUL-padding,
> +the safe replacement is `strscpy_pad()`.
Please make those just strscpy(), not `strscpy()`. As I said, the right
thing will happen.
Thanks,
jon
next prev parent reply other threads:[~2019-07-09 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 15:48 [PATCH v4] Added warnings in checkpatch.pl script to : NitinGote
2019-07-09 15:58 ` Jonathan Corbet [this message]
2019-07-09 16:10 ` Joe Perches
2019-07-11 3:46 ` Gote, Nitin R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190709095807.72adb380@lwn.net \
--to=corbet@lwn.net \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nitin.r.gote@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.