On Mon, Mar 22, 2021 at 11:05:48AM +0300, Dmitry Bogdanov wrote: > +static int > +target_fabric_setup_tpg_base_cit(struct target_fabric_configfs *tf) > +{ > + int i, k, len = 0; > + struct config_item_type *cit = &tf->tf_tpg_base_cit; > + struct configfs_attribute **attrs; > + > + if (tf->tf_ops->fabric_enable_tpg) > + for (i = 0; core_tpg_base_enable_attrs[i]; i++) > + len += sizeof(struct configfs_attribute *); ... > + if (tf->tf_ops->fabric_enable_tpg) > + for (i = 0; core_tpg_base_enable_attrs[i]; i++) ... >+CONFIGFS_ATTR(core_tpg_base_, enable); >+ >+struct configfs_attribute *core_tpg_base_enable_attrs[] = { >+ &core_tpg_base_attr_enable, >+ NULL, I believe that there is no real benefit in core_tpg_base_enable_attrs[] with only one attribute. Just use core_tpg_base_attr_enable directly.