Subject: Re: [PATCH net-next 2/2] bonding: options handling cleanup

From: Nikolay Aleksandrov <[email-masked]>
Date: Wed, 05 Mar 2014 12:39:09 +0100

On 03/05/2014 01:36 AM, Stephen Hemminger wrote:
> Make local functions static (ie. only used in bond_options.c)
> Make bond options parsing tables constant.
> 
> Signed-off-by: Stephen Hemminger <[email-masked]>
> 
> 
> ---
>  drivers/net/bonding/bond_main.c    |    3 
>  drivers/net/bonding/bond_options.c |  190 ++++++++++++++++++++++++-------------
>  drivers/net/bonding/bond_options.h |   57 +----------
>  drivers/net/bonding/bond_sysfs.c   |   16 +--
>  drivers/net/bonding/bonding.h      |    2 
>  5 files changed, 141 insertions(+), 127 deletions(-)
> 

Hi Stephen,
Thanks for doing this, it was one of the items on my todo list for a long time.
However there're a few more places that need cleaning up after the patch is applied:
drivers/net/bonding//bond_options.c: In function ‘bond_opt_dep_print’:
drivers/net/bonding//bond_options.c:511:10: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
  modeval = bond_opt_get_val(BOND_OPT_MODE, params->mode);
          ^
drivers/net/bonding//bond_options.c: In function ‘bond_opt_error_interpret’:
drivers/net/bonding//bond_options.c:540:10: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
   minval = bond_opt_get_flags(opt, BOND_VALFLAG_MIN);
          ^
drivers/net/bonding//bond_options.c:541:10: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
   maxval = bond_opt_get_flags(opt, BOND_VALFLAG_MAX);
          ^
drivers/net/bonding//bond_options.c: In function ‘__bond_opt_set’:
drivers/net/bonding//bond_options.c:589:9: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
  retval = bond_opt_parse(opt, val);
         ^
drivers/net/bonding//bond_procfs.c: In function ‘bond_info_show_master’:
drivers/net/bonding//bond_procfs.c:79:10: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
   optval = bond_opt_get_val(BOND_OPT_FAIL_OVER_MAC,
          ^
drivers/net/bonding//bond_procfs.c:88:10: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
   optval = bond_opt_get_val(BOND_OPT_XMIT_HASH,
          ^
drivers/net/bonding//bond_procfs.c:99:11: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
    optval = bond_opt_get_val(BOND_OPT_PRIMARY_RESELECT,
           ^
drivers/net/bonding//bond_procfs.c:144:10: warning: assignment discards ‘const’
qualifier from pointer target type [enabled by default]
   optval = bond_opt_get_val(BOND_OPT_AD_SELECT,