port_attribute
ssize_t (*show)(struct mlx4_port *, struct port_attribute *, char *buf);
ssize_t (*store)(struct mlx4_port *, struct port_attribute *,
struct port_attribute *port_attr =
container_of(attr, struct port_attribute, attr);
struct port_attribute *port_attr =
container_of(attr, struct port_attribute, attr);
struct port_attribute attr;
static ssize_t show_port_pkey(struct mlx4_port *p, struct port_attribute *attr,
static ssize_t store_port_pkey(struct mlx4_port *p, struct port_attribute *attr,
struct port_attribute *attr, char *buf)
struct port_attribute *, char *buf),
ssize_t (*store)(struct mlx4_port *, struct port_attribute *,
struct port_attribute *port_attr =
container_of(attr, struct port_attribute, attr);
struct port_attribute *port_attr =
container_of(attr, struct port_attribute, attr);
struct port_attribute *port_attr =
container_of(attr, struct port_attribute, attr);
static ssize_t state_show(struct ib_port *p, struct port_attribute *unused,
static ssize_t lid_show(struct ib_port *p, struct port_attribute *unused,
struct port_attribute *unused,
static ssize_t sm_lid_show(struct ib_port *p, struct port_attribute *unused,
static ssize_t sm_sl_show(struct ib_port *p, struct port_attribute *unused,
static ssize_t cap_mask_show(struct ib_port *p, struct port_attribute *unused,
static ssize_t rate_show(struct ib_port *p, struct port_attribute *unused,
static ssize_t phys_state_show(struct ib_port *p, struct port_attribute *unused,
static ssize_t link_layer_show(struct ib_port *p, struct port_attribute *unused,
struct ib_port *p, struct port_attribute *attr, char *buf,
static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
struct port_attribute *attr, char *buf)
struct port_attribute *attr,
static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
static ssize_t show_pma_counter(struct ib_port *p, struct port_attribute *attr,
ssize_t (*show)(struct ib_port *, struct port_attribute *, char *buf);
struct port_attribute *, char *buf),
ssize_t (*store)(struct ib_port *, struct port_attribute *,
struct port_attribute port_attr_##_name = __ATTR(_name, _mode, _show, _store)
struct port_attribute port_attr_##_name = __ATTR_RO(_name)
struct port_attribute attr;