aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types_flow_action.c
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2018-05-31 16:43:28 +0300
committerLeon Romanovsky <leonro@mellanox.com>2018-06-02 07:33:53 +0300
commit3efa38125b81fb4eb7dbb43295cb82a203dc0398 (patch)
treeb70ce7fe0a8d71a80fb8483ffc2447a5a530c0c8 /drivers/infiniband/core/uverbs_std_types_flow_action.c
parentnet/mlx5: Export flow counter related API (diff)
downloadlinux-dev-3efa38125b81fb4eb7dbb43295cb82a203dc0398.tar.xz
linux-dev-3efa38125b81fb4eb7dbb43295cb82a203dc0398.zip
IB/uverbs: Add an ib_uobject getter to ioctl() infrastructure
Previously, the user had to dig inside the attribute to get the uobject. Add a helper function that correctly extract it (and do the required checks) for him/her. Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types_flow_action.c')
-rw-r--r--drivers/infiniband/core/uverbs_std_types_flow_action.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types_flow_action.c b/drivers/infiniband/core/uverbs_std_types_flow_action.c
index cbcec3da12f6..00e6b34bc16b 100644
--- a/drivers/infiniband/core/uverbs_std_types_flow_action.c
+++ b/drivers/infiniband/core/uverbs_std_types_flow_action.c
@@ -320,7 +320,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_CREATE)(struct ib_device
return ret;
/* No need to check as this attribute is marked as MANDATORY */
- uobj = uverbs_attr_get(attrs, UVERBS_ATTR_FLOW_ACTION_ESP_HANDLE)->obj_attr.uobject;
+ uobj = uverbs_attr_get_uobject(attrs, UVERBS_ATTR_FLOW_ACTION_ESP_HANDLE);
action = ib_dev->create_flow_action_esp(ib_dev, &esp_attr.hdr, attrs);
if (IS_ERR(action))
return PTR_ERR(action);
@@ -350,7 +350,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY)(struct ib_device
if (ret)
return ret;
- uobj = uverbs_attr_get(attrs, UVERBS_ATTR_FLOW_ACTION_ESP_HANDLE)->obj_attr.uobject;
+ uobj = uverbs_attr_get_uobject(attrs, UVERBS_ATTR_FLOW_ACTION_ESP_HANDLE);
action = uobj->object;
if (action->type != IB_FLOW_ACTION_ESP)