Re: [PATCH net-next V3 1/5] net/mlx5: nodnic: Introduce the mlx5_nodnic driver

From: Shahar Shitrit

Date: Mon Nov 30 2026 - 04:03:12 EST




On 27/11/2026 10:58, Paolo Abeni wrote:
> On 11/26/26 19:24, Tariq Toukan wrote:
>> +struct mlx5_ifc_nodnic_clear_int_bits {
>> +    u8 reserved_at_0[0x1f];
>> +    u8 clear_int[0x1];
>
> For some reason coccinelle is not happy here:
>
> +/srv/nipa-builds-contest/testing/wt-cocci/drivers/net/ethernet/
> mellanox/mlx5/nodnic/nodnic_ifc.h:140:4-13: WARNING use flexible-array
> member instead (https://www.kernel.org/doc/html/latest/process/
> deprecated.html#zero-length-and-one-element-arrays)
>
> [...]> +struct mlx5_ifc_nodnic_gen_cfg_caps_bits  {
>> +    u8 revision[0x8];
>> +    u8 hardware_format[0x8];
>> +    u8 support_receive_filter[0x1];
>> +    u8 support_promisc_filter[0x1];
>> +    u8 support_promisc_multicast[0x1];
>> +    u8 support_protocol_filter[0x1];
>> +    u8 reserved_at_13[0x1];
>> +    u8 log_working_buffer_size[0x3];
>> +    u8 log_pkey_table_size[0x4]; /* IB */
>> +    u8 reserved_at_1a[0x3];
>> +    u8 num_ports[0x1];
>
> and here:
>
> +/srv/nipa-builds-contest/testing/wt-cocci/drivers/net/ethernet/
> mellanox/mlx5/nodnic/nodnic_ifc.h:271:4-13: WARNING use flexible-array
> member instead (https://www.kernel.org/doc/html/latest/process/
> deprecated.html#zero-length-and-one-element-arrays)
>
> Both look like false positive, but could you please have a look?
>
> I removing the series from PW, we want clean CI output, otherwise
> patch validation becomes more expensive.
>
> Thanks,
>
> Paolo

Neither clear_int nor num_ports is used by the driver, so in V4 these
two layouts will no longer end with a 1-bit field, and the cocci check
should be clean.
>