Re: [PATCH] media: dvb-frontends: avoid stack overflow warnings with clang

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

 



On Fri, Feb 16, 2024, at 19:56, Justin Stitt wrote:
> On Fri, Feb 16, 2024 at 8:32 AM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>> -
>> -       buf[0] = MSB(reg);
>> -       buf[1] = LSB(reg);
>> -       memcpy(buf + 2, data, len);
>
> I'm curious why a copy was made at all.
>
> Reviewed-by: Justin Stitt <justinstitt@xxxxxxxxxx>

I guess the idea was to allow writing arbitrarily long
contents to a single register with a single decriptor.

The current version of the driver only ever writes a single
byte value, but maybe it either used to have other writes,
or it was meant to support them later but never did.

      Arnd





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux