Re: [PATCH v2] staging: vt6656: Use ARRAY_SIZE instead of hardcoded size

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

 



On 03/24/20 16:18:30, Dan Carpenter wrote:
> That's a bit over engineering something which is pretty trivial.
> Normally, we would just make the size a define instead of a magic number
> 14.

My bad, I meant "define", not "macro".

> If people change the size in the future (unlikely) and it causes a bug
> then they kind of deserve it because they need to ensure all the new
> stuff is initialized, right?  If they change it and it results in a
> buffer overflow then static checkers would complain.  If they changed it
> and it resulted in uninitialized data being used then it would be zero
> so that's okay.

I wasn't sure where I should stand on this, that's clearer now.

Thanks,
Quentin
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux