* [patch] devlink: clean up a condition
@ 2016-06-16 6:50 Dan Carpenter
2016-06-16 14:15 ` Or Gerlitz
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-06-16 6:50 UTC (permalink / raw)
To: Or Gerlitz; +Cc: Leon Romanovsky, linux-kernel, kernel-janitors
Presumably having a _get() function implies that we also have a _set()
function but lets make it match when we're calling.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/core/devlink.c b/net/core/devlink.c
index a4f88cb..b2e592a 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -1461,7 +1461,7 @@ static int devlink_nl_cmd_eswitch_mode_set_doit(struct sk_buff *skb,
mode = nla_get_u16(info->attrs[DEVLINK_ATTR_ESWITCH_MODE]);
- if (ops && ops->eswitch_mode_get)
+ if (ops && ops->eswitch_mode_set)
return ops->eswitch_mode_set(devlink, mode);
return -EOPNOTSUPP;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] devlink: clean up a condition
2016-06-16 6:50 [patch] devlink: clean up a condition Dan Carpenter
@ 2016-06-16 14:15 ` Or Gerlitz
0 siblings, 0 replies; 2+ messages in thread
From: Or Gerlitz @ 2016-06-16 14:15 UTC (permalink / raw)
To: Dan Carpenter
Cc: Leon Romanovsky, linux-kernel, kernel-janitors, Saeed Mahameed,
Hadar Har-Zion
On 6/16/2016 9:50 AM, Dan Carpenter wrote:
> Presumably having a _get() function implies that we also have a _set()
> function but lets make it match when we're calling.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/net/core/devlink.c b/net/core/devlink.c
> index a4f88cb..b2e592a 100644
> --- a/net/core/devlink.c
> +++ b/net/core/devlink.c
> @@ -1461,7 +1461,7 @@ static int devlink_nl_cmd_eswitch_mode_set_doit(struct sk_buff *skb,
>
> mode = nla_get_u16(info->attrs[DEVLINK_ATTR_ESWITCH_MODE]);
>
> - if (ops && ops->eswitch_mode_get)
> + if (ops && ops->eswitch_mode_set)
> return ops->eswitch_mode_set(devlink, mode);
> return -EOPNOTSUPP;
> }
good catch Dan, we will incorporate that into the patch set
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-16 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 6:50 [patch] devlink: clean up a condition Dan Carpenter
2016-06-16 14:15 ` Or Gerlitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).