From: Konstantin Shelekhin <k.shelekhin@yadro.com>
To: Dmitry Bogdanov <d.bogdanov@yadro.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
<target-devel@vger.kernel.org>, <linux-scsi@vger.kernel.org>,
<linux@yadro.com>, Nilesh Javali <njavali@marvell.com>,
Chris Boot <bootc@bootc.net>,
Bart Van Assche <bvanassche@acm.org>,
Michael Cyr <mikecyr@linux.ibm.com>,
Felipe Balbi <balbi@kernel.org>,
Roman Bolshakov <r.bolshakov@yadro.com>
Subject: Re: [PATCH v2 1/7] target: core: add common tpg/enable attribute
Date: Thu, 25 Mar 2021 00:51:16 +0300 [thread overview]
Message-ID: <YFu0VFEJjUJy+vF9@yadro.com> (raw)
In-Reply-To: <20210322080554.7611-2-d.bogdanov@yadro.com>
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.
next prev parent reply other threads:[~2021-03-24 21:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 8:05 [PATCH v2 0/7] target: make tpg/enable attribute Dmitry Bogdanov
2021-03-22 8:05 ` [PATCH v2 1/7] target: core: add common " Dmitry Bogdanov
2021-03-22 17:35 ` Mike Christie
2021-03-22 17:55 ` Dmitriy Bogdanov
2021-03-24 21:51 ` Konstantin Shelekhin [this message]
2021-03-22 8:05 ` [PATCH v2 2/7] target: iscsi: replace enable attr to ops.enable Dmitry Bogdanov
2021-03-22 17:43 ` Mike Christie
2021-03-22 8:05 ` [PATCH v2 3/7] target: qla2xx: " Dmitry Bogdanov
2021-03-22 8:05 ` [PATCH v2 4/7] target: sbp: " Dmitry Bogdanov
2021-03-22 8:05 ` [PATCH v2 5/7] target: srpt " Dmitry Bogdanov
2021-03-22 8:05 ` [PATCH v2 6/7] target: ibm_vscsi: " Dmitry Bogdanov
2021-03-22 8:05 ` [PATCH v2 7/7] target: usb: " Dmitry Bogdanov
2021-03-22 14:49 ` [PATCH v2 0/7] target: make tpg/enable attribute Himanshu Madhani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YFu0VFEJjUJy+vF9@yadro.com \
--to=k.shelekhin@yadro.com \
--cc=balbi@kernel.org \
--cc=bootc@bootc.net \
--cc=bvanassche@acm.org \
--cc=d.bogdanov@yadro.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@yadro.com \
--cc=martin.petersen@oracle.com \
--cc=mikecyr@linux.ibm.com \
--cc=njavali@marvell.com \
--cc=r.bolshakov@yadro.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox