On 4/16/2024 6:32 PM, Stephen Hemminger wrote:
> On Tue, 16 Apr 2024 17:29:25 +0100
> Ferruh Yigit <ferruh.yi...@amd.com> wrote:
> 
>> On 4/16/2024 4:19 PM, Stephen Hemminger wrote:
>>> Use RTE_DIM instead of computing directly with sizeof.
>>> Patch automatically generated via cocci/rte_dim.cocci.
>>> Code in base/ subdirectory manually excluded.
>>>
>>> Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
>>>   
>>
>> Updated ones looks good to me, but I can see a few more, I don't know if
>> you excluded base file one intentionally,
>> searched as `git grep "sizeof.*\[0\]" drivers/net/`
>>
>>
>> -
>> drivers/net/bnxt/tf_core/cfa_tcam_mgr.h:28:#define ARRAY_SIZE(_array)
>> (sizeof(_array) / sizeof(_array[0]))
>>
>> -
> 
> For the drivers that choose to define and use ARRAY_SIZE() that is fine.
> 

ack
Although it can be updated as following, I don't think it differs
`#define ARRAY_SIZE(_array) RTE_DIM(_array)`

> Since base/ directories often come from other upstream repos, I ignored those.
> 

ack

> Something about the Intel drivers was causing warnings and the script would
> not automatically change those.
> 

ICE_NB_MBUF_XSTATS, I40E_NB_MBUF_XSTATS & ipn3ke_representor.c ones
seems can be updated, manually maybe?

Reply via email to