From: sashiko-bot@kernel.org
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH] scsi: target: Constify struct configfs_attribute pointers
Date: Sat, 07 Nov 2026 05:08:03 +0000 [thread overview]
Message-ID: <sashiko-outbox-202608@kernel.org> (raw)
In-Reply-To: <20261107-configfs-const-target-v1-1-a1bf9511386c@weissschuh.net>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] scsi: target: incomplete ct_attrs_const conversion in target
core and iscsi
--
commit d8c2eba7f9079194d5b3b7e6d1172b540dc79568
Author: Thomas Weißschuh <linux@weissschuh.net>
scsi: target: Constify struct configfs_attribute pointers
This commit constifies struct configfs_attribute pointer arrays across the
target subsystem and its fabric drivers and switches struct config_item_type
definitions from ct_attrs to ct_attrs_const.
> diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
> index ab8f81650710e..61929f28fcc57 100644
> --- a/drivers/target/target_core_fabric_configfs.c
> +++ b/drivers/target/target_core_fabric_configfs.c
[ ... ]
> @@ -921,7 +921,7 @@ target_fabric_setup_tpg_base_cit(struct target_fabric_configfs *tf)
> attrs[i++] = &target_fabric_tpg_base_attr_rtpi;
>
> cit->ct_item_ops = &target_fabric_tpg_base_item_ops;
> - cit->ct_attrs = attrs;
> + cit->ct_attrs_const = attrs;
> cit->ct_owner = tf->tf_ops->module;
> pr_debug("Setup generic tpg_base\n");
[Severity: Low]
Should target_unregister_template() in drivers/target/target_core_configfs.c
also be updated to free t->tf_tpg_base_cit.ct_attrs_const instead of
t->tf_tpg_base_cit.ct_attrs?
In addition, drivers/target/target_core_stat.c and
drivers/target/iscsi/iscsi_target_stat.c still define non-const struct
configfs_attribute pointer arrays and initialize .ct_attrs in their struct
config_item_type definitions, which will break the build once the
transitional ct_attrs union member is removed and CONFIGFS_ATTR_RO is made
const.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107-configfs-const-target-v1-1-a1bf9511386c@weissschuh.net?part=1
prev parent reply other threads:[~2026-11-07 5:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 4:58 [PATCH] scsi: target: Constify struct configfs_attribute pointers Thomas Weißschuh
2026-11-07 5:08 ` sashiko-bot [this message]
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=sashiko-outbox-202608@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=sashiko-reviews@lists.linux.dev \
--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