lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net] devlink: Fix devlink_param_driverinit_value_set() stub return code
From
Date
On 9/4/18 7:04 AM, Moshe Shemesh wrote:
> The stub function returned -EOPNOTSUPP while CONFIG_NET_DEVLINK is off.
> It caused false warning during driver load. Driver needs to update
> devlink on a parameter value if devlink module is there, if not it
> doesn't need any error code.
>
> Fixes: ec01aeb1803e ("devlink: Add support for get/set driverinit value")
> Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>
> ---
> include/net/devlink.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/devlink.h b/include/net/devlink.h
> index b9b89d6..b467357 100644
> --- a/include/net/devlink.h
> +++ b/include/net/devlink.h
> @@ -781,7 +781,7 @@ static inline bool devlink_dpipe_table_counter_enabled(struct devlink *devlink,
> devlink_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
> union devlink_param_value init_val)
> {
> - return -EOPNOTSUPP;
> + return 0;
> }
>
> static inline void
>

This should be handled by the driver -- check for -EOPNOTSUPP and not
log an error.

devlink is generic infrastructure. If a call is made and the operation
is not supported, then devlink should return an error.

\
 
 \ /
  Last update: 2018-09-04 18:15    [W:0.070 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site