mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>, leitao@debian.org
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH 0/2] configfs: Constify some fileds in struct config_item_type
Date: Wed, 29 Oct 2025 08:18:34 +0100	[thread overview]
Message-ID: <87sef2fa5x.fsf@t14s.mail-host-address-is-not-set> (raw)
In-Reply-To: <cover.1761390472.git.christophe.jaillet@wanadoo.fr>

"Christophe JAILLET" <christophe.jaillet@wanadoo.fr> writes:

> These 2 patches constify ct_item_ops and ct_group_ops in struct
> config_item_type.
>
> When/if they are applied, I'll send some patchess in each subsystem to
> constify the corresponding structures.
>
> This 2 steps approach is IMHO easier way to make these changes.
> This avoids long series and cover-letter/first patches sent to many
> maintainers and lists.
>
> However, if you prefer things to be done in the same serie, I can do
> that as well.

Looks good to me. Please also include a patch to fix up the rust
bindings in the 2nd step:

diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs
index 318a2f073d1c7..468c8c4170d5e 100644
--- a/rust/kernel/configfs.rs
+++ b/rust/kernel/configfs.rs
@@ -755,8 +755,8 @@ pub const fn new_with_child_ctor<const N: usize, Child>(
                 Self {
                     item_type: Opaque::new(bindings::config_item_type {
                         ct_owner: owner.as_ptr(),
-                        ct_group_ops: GroupOperationsVTable::<Data, Child>::vtable_ptr().cast_mut(),
-                        ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr().cast_mut(),
+                        ct_group_ops: GroupOperationsVTable::<Data, Child>::vtable_ptr(),
+                        ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr(),
                         ct_attrs: core::ptr::from_ref(attributes).cast_mut().cast(),
                         ct_bin_attrs: core::ptr::null_mut(),
                     }),
@@ -773,7 +773,7 @@ pub const fn new<const N: usize>(
                     item_type: Opaque::new(bindings::config_item_type {
                         ct_owner: owner.as_ptr(),
                         ct_group_ops: core::ptr::null_mut(),
-                        ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr().cast_mut(),
+                        ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr(),
                         ct_attrs: core::ptr::from_ref(attributes).cast_mut().cast(),
                         ct_bin_attrs: core::ptr::null_mut(),
                     }),



Best regards,
Andreas Hindborg



  parent reply	other threads:[~2025-10-29  7:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <UMPsw5UqjtBaIrv5LPKiow0sOdVevbuvSx39jhXV_gtjHReEeeqGpgijGJj5OoJjMJA3mDIeSyzR9lffgIOr6g==@protonmail.internalid>
2025-10-25 11:15 ` Christophe JAILLET
2025-10-25 11:15   ` [PATCH 1/2] configfs: Constify ct_group_ops " Christophe JAILLET
2025-11-04 10:12     ` Breno Leitao
2025-10-25 11:15   ` [PATCH 2/2] configfs: Constify ct_item_ops " Christophe JAILLET
2025-11-04 10:10     ` Breno Leitao
2025-10-29  7:18   ` Andreas Hindborg [this message]
2025-11-01 13:13     ` [PATCH 0/2] configfs: Constify some fileds " Christophe JAILLET
2025-11-01 15:02       ` Andreas Hindborg
2025-11-27 11:12   ` Andreas Hindborg

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=87sef2fa5x.fsf@t14s.mail-host-address-is-not-set \
    --to=a.hindborg@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®