lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next v3 14/21] ethtool: provide link mode names as a string set
On Wed, Feb 20, 2019 at 07:21:58PM -0800, Florian Fainelli wrote:
> > +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)

Thanks for the tip, that should work for most of the modes.

Michal

\
 
 \ /
  Last update: 2019-02-21 10:57    [W:0.042 / U:7.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site