Re: [PATCH v2] rbd: replace strcpy() with strscpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 20, 2025 at 10:26 PM Jens Axboe <axboe@xxxxxxxxx> wrote:
>
> 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@xxxxxxxxx>
> >> ---
> >> 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.

Understood. If the typedef approach is a go after Ilya's feedback,
I'll split the changes into two separate patches as you suggested.
Thanks a lot for the review.

--
With Gratitude
Siddarth Gundu





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux