Commit c05d2664 authored by Kamal Heib's avatar Kamal Heib Committed by Doug Ledford

IB/rxe: Use DEVICE_ATTR_RO macro to show parent field

Use DEVICE_ATTR RO() macro and rename the show function accordingly.
Signed-off-by: default avatarKamal Heib <kamalh@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent c498e82e
...@@ -1210,7 +1210,7 @@ static int rxe_detach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid) ...@@ -1210,7 +1210,7 @@ static int rxe_detach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid)
return rxe_mcast_drop_grp_elem(rxe, qp, mgid); return rxe_mcast_drop_grp_elem(rxe, qp, mgid);
} }
static ssize_t rxe_show_parent(struct device *device, static ssize_t parent_show(struct device *device,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct rxe_dev *rxe = container_of(device, struct rxe_dev, struct rxe_dev *rxe = container_of(device, struct rxe_dev,
...@@ -1219,7 +1219,7 @@ static ssize_t rxe_show_parent(struct device *device, ...@@ -1219,7 +1219,7 @@ static ssize_t rxe_show_parent(struct device *device,
return snprintf(buf, 16, "%s\n", rxe_parent_name(rxe, 1)); return snprintf(buf, 16, "%s\n", rxe_parent_name(rxe, 1));
} }
static DEVICE_ATTR(parent, S_IRUGO, rxe_show_parent, NULL); static DEVICE_ATTR_RO(parent);
static struct device_attribute *rxe_dev_attributes[] = { static struct device_attribute *rxe_dev_attributes[] = {
&dev_attr_parent, &dev_attr_parent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment