Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static void linkstate_get_ext_state(struct net_device *dev,
> +				    struct linkstate_reply_data *data)
> +{
> +	int err;
> +
> +	if (!dev->ethtool_ops->get_ext_state)
> +		return;
> +
> +	err = dev->ethtool_ops->get_ext_state(dev, &data->ethtool_ext_state_info);
> +	if (err) {
> +		data->ext_state_provided = false;
> +		return;
> +	}
> +
> +	data->ext_state_provided = true;
>  }

A void function is rather odd for this sort of thing. It is much more
normal to return an error code, -EOPNOTSUPP if the op is not available,
or 0 if it all went well.

   Andrew



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux