[PATCH 02/46] common/sfc_efx/base: add efsys option for Medford4

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Fri Apr 18 09:25:44 CEST 2025


On 4/17/25 18:07, Stephen Hemminger wrote:
> On Thu, 17 Apr 2025 10:08:20 +0300
> Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru> wrote:
> 
>>>    #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
>>>    /* Support adapters with missing static config (for factory use only) */
>>> -# if !(EFSYS_OPT_RIVERHEAD || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
>>> -#  error "ALLOW_UNCONFIGURED_NIC requires RIVERHEAD or MEDFORD or MEDFORD2"
>>> +# if !(EFSYS_OPT_RIVERHEAD || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 || \
>>> +	EFSYS_OPT_MEDFORD4)
>>> +#  error "ALLOW_UNCONFIGURED_NIC requires RIVERHEAD or MEDFORD or MEDFORD2 " \
>>> +	"or MEDFORD4"
>>
>> Typically it is a bad idea to split error message since it complicates grep.
>> Please, double-check that base driver code style requires.
>> As far as I remember - no.
> 
> Would a static_assert() logic be less complex here?

It is a base driver with its own rules and the same code was used in
many places (platforms, drivers) before. I don't know what is today.
So, I guess static_assert() is not an option here.



More information about the dev mailing list