On 2/18/2019 10:22 AM, Michal Kubecek wrote:
> Add table of ethernet link mode names and make it available as a string set
> to userspace GET_STRSET requests.
> 
> Signed-off-by: Michal Kubecek <mkube...@suse.cz>
> ---

[snip]

>  
> +const char *const link_mode_names[] = {

Maybe you can define a macro (totally untested) to build the table an
avoid some of the repetition, something like:

#define ETHTOOL_LINK_NAME(speed, duplex) \
        [ETHTOOL_LINK_MODE_##speed_##duplex_BIT]        = stringify(speed ## 
"/" ##
duplex)

-- 
Florian

Reply via email to