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

2020-03-26 Thread Oscar Carter
On Wed, Mar 25, 2020 at 09:19:24AM +, Quentin Deslandes wrote: > 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",

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

2020-03-25 Thread Quentin Deslandes
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

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

2020-03-24 Thread Dan Carpenter
On Tue, Mar 24, 2020 at 09:54:56AM +, Quentin Deslandes wrote: > On 03/18/20 18:40:15, Oscar Carter wrote: > > Use ARRAY_SIZE to replace the hardcoded size so we will never have a > > mismatch. > > > > Signed-off-by: Oscar Carter > > --- > > Changelog v1 -> v2 > > - Use

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

2020-03-24 Thread Quentin Deslandes
On 03/18/20 18:40:15, Oscar Carter wrote: > Use ARRAY_SIZE to replace the hardcoded size so we will never have a > mismatch. > > Signed-off-by: Oscar Carter > --- > Changelog v1 -> v2 > - Use ARRAY_SIZE(priv->cck_pwr_tbl) everywhere instead of introducing a new > variable to hold its value. >