[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7708ccbe-f967-4910-8a73-bb66bbca214e@kernel.dk>
Date: Tue, 20 May 2025 10:56:08 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Alex Elder <elder@...e.org>, Siddarth Gundu <siddarthsgml@...il.com>,
idryomov@...il.com, dongsheng.yang@...ystack.cn, ceph-devel@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rbd: replace strcpy() with strscpy()
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@...il.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
Powered by blists - more mailing lists