From: Jens Axboe <axboe@kernel.dk>
To: Alex Elder <elder@ieee.org>,
Siddarth Gundu <siddarthsgml@gmail.com>,
idryomov@gmail.com, dongsheng.yang@easystack.cn,
ceph-devel@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] rbd: replace strcpy() with strscpy()
Date: Tue, 20 May 2025 10:56:08 -0600 [thread overview]
Message-ID: <7708ccbe-f967-4910-8a73-bb66bbca214e@kernel.dk> (raw)
In-Reply-To: <f92ddea4-edf1-42f9-a738-51233ce3d45e@ieee.org>
On 5/20/25 10:44 AM, Alex Elder wrote:
> On 5/19/25 1:38 AM, Siddarth Gundu wrote:
>> strcpy() is deprecated; use strscpy() instead.
>>
>> Both the destination and source buffer are of fixed length
>> so strscpy with 2-arguments is used.
>>
>> Introduce a typedef for cookie array to improve code clarity.
>>
>> Link: https://github.com/KSPP/linux/issues/88
>> Signed-off-by: Siddarth Gundu <siddarthsgml@gmail.com>
>> ---
>> changes since v1
>> - added a typedef for cookie arrays
>>
>> About the typedef: I was a bit hesitant to add it since the kernel
>> style guide is against adding new typedef but I wanted to follow
>> the review feedback for this.
>
> I personally think the typedef here is the appropriate. But
> it's really up to Ilya whether he likes this approach. Get
> his input before you do more.
In any case, this should be 2 patches at that point, not collapsed
into one patch.
--
Jens Axboe
next prev parent reply other threads:[~2025-05-20 16:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 6:38 Siddarth Gundu
2025-05-20 16:44 ` Alex Elder
2025-05-20 16:56 ` Jens Axboe [this message]
2025-05-21 19:49 ` Siddarth Gundu
2025-05-21 19:47 ` Siddarth Gundu
-- strict thread matches above, loose matches on Subject: below --
2025-05-18 22:50 Siddarth Gundu
2025-05-19 6:31 ` Siddarth Gundu
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=7708ccbe-f967-4910-8a73-bb66bbca214e@kernel.dk \
--to=axboe@kernel.dk \
--cc=ceph-devel@vger.kernel.org \
--cc=dongsheng.yang@easystack.cn \
--cc=elder@ieee.org \
--cc=idryomov@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=siddarthsgml@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®