From nobody Sun Feb 8 01:33:05 2026 Received: from smtp.smtpout.orange.fr (smtp-76.smtpout.orange.fr [80.12.242.76]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D05C2F618B for ; Sat, 25 Oct 2025 11:17:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.76 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761391077; cv=none; b=qntdYOIBZWPm315Fu8gQ4K6w5i70nlafvTRK7Y7VuQ49+gZIbL7aD1yQd5Ylf8XKIqsbJaFWwaUj0zSEM+yb0WJzgtByOWUjXBuT/Lg2FBj4FuwDmUbNG0DAnlwR52f9c7f1bKYqP9OM7g/yeiV9ZyeBwvTMUV+IWHCNlR6dR+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761391077; c=relaxed/simple; bh=rToOlBVa0seIk9cZAhalyksEJosElZgKUnKVSSTyRcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SSommV2NynhgTQmEIN4J3NlfWkHERAYqPdlJhBVyALprNeBZ4iWM4ldM8vlMarBCdhvHoT8CNrlaTbg56Xk+QbWHYwqgoORTWwWTPgwpx+VXOZrZYtkUFY5uHhvxBh6l0OCZw1DDNwBAm2JYcQSafbqSG3IUHy7S3TT+ja9t56U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=N6wHXizT; arc=none smtp.client-ip=80.12.242.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="N6wHXizT" Received: from fedora.home ([IPv6:2a01:cb10:785:b00:8347:f260:7456:7662]) by smtp.orange.fr with ESMTPA id CcHGvE38qB8skCcHSvnEto; Sat, 25 Oct 2025 13:17:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1761391075; bh=0l/wY++KmID5MdksSCXlO5KXcYonclJ1OjINevUWC98=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=N6wHXizTh1Tw0OYBE9zsatpOX4PnkDmEvse1odCYX0KxM3lRNWRhVi+8g8jGXyBEH PqzXBa89qhGnuLutsMUuodoXOJoR6VlYxM4dRVdHg36BQkKXkGNHMM59TC1ws+YFWX Dz6nmXrB6Lz72BARCr8KQVVsZpKu/qv82Y1xhXth9DpoYO3PxNkIAWZ5b1cjqJgWNm a5qWMx2iKHrVlDOaRx+LuW7MoijNhb1+HF4TLPVQcQ0k2dWkbrTpsQgn9JXgIFCHgZ ZyrtUe62aa0EfMapSfDYtmHSPJf4lhsHMt7wkQYnUyUiv+mgioxEnss494psL35IWW vagpOxeak5pcA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 25 Oct 2025 13:17:55 +0200 X-ME-IP: 2a01:cb10:785:b00:8347:f260:7456:7662 From: Christophe JAILLET To: a.hindborg@kernel.org, leitao@debian.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 1/2] configfs: Constify ct_group_ops in struct config_item_type Date: Sat, 25 Oct 2025 13:15:37 +0200 Message-ID: <6b720cf407e8a6d30f35beb72e031b2553d1ab7e.1761390472.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.51.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make 'ct_group_ops' const in struct config_item_type. This allows constification of many structures which hold some function pointers. Signed-off-by: Christophe JAILLET Reviewed-by: Breno Leitao --- Compile tested only files that explicitly use ct_group_ops. The script used for that is: while IFS=3D read -r -d '' file; do obj=3D"${file%.c}.o" ; echo -e "\nCompiling $file" ; make "$obj" done < <(git grep --name-only -z ct_group_ops '*.c') --- fs/configfs/dir.c | 2 +- include/linux/configfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 81f4f06bc87e..4bcd14b3434c 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -598,7 +598,7 @@ static void detach_attrs(struct config_item * item) static int populate_attrs(struct config_item *item) { const struct config_item_type *t =3D item->ci_type; - struct configfs_group_operations *ops; + const struct configfs_group_operations *ops; struct configfs_attribute *attr; struct configfs_bin_attribute *bin_attr; int error =3D 0; diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 698520b1bfdb..31a7d7124460 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h @@ -65,7 +65,7 @@ extern void config_item_put(struct config_item *); struct config_item_type { struct module *ct_owner; struct configfs_item_operations *ct_item_ops; - struct configfs_group_operations *ct_group_ops; + const struct configfs_group_operations *ct_group_ops; struct configfs_attribute **ct_attrs; struct configfs_bin_attribute **ct_bin_attrs; }; --=20 2.51.0 From nobody Sun Feb 8 01:33:05 2026 Received: from smtp.smtpout.orange.fr (smtp-75.smtpout.orange.fr [80.12.242.75]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0A292F7AB6 for ; Sat, 25 Oct 2025 11:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.75 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761391080; cv=none; b=uoJQm0X6UbZfiqSojFto6JmprhzPhmBBLq9cpn6BvSweNj21ygSdXyI5yTWyT4xnmyHNwyXonJEPtRljZYYcyc9rhnd+6+Id8/SgnMSjF1GK33mqYSHIoeG+NLtfKUxZsQdPbAXHobooURdigeHXZwRjKjMtyq3EL/JIRety9PE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761391080; c=relaxed/simple; bh=SpKHxgF2ARH/BdQ+OHb950R1xoLHDWjTlV7gpt4N14g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d7vUyzs7KvtzWt2SoumjNejChPQfmyBSk/zl3sQN9pQ6RvuBUFWt9nHsmjiL9o3dbAMz79Si37AwQKuDntZsmYFtrkCenxdxowFI3DUEjzfAxU/5LNMnlvCmQegmEypTlD/6HrxZ/elJ7uO5aq1snS6vs9yVpcbWatjuigB4CQI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=QiNWXidt; arc=none smtp.client-ip=80.12.242.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="QiNWXidt" Received: from fedora.home ([IPv6:2a01:cb10:785:b00:8347:f260:7456:7662]) by smtp.orange.fr with ESMTPA id CcHGvE38qB8skCcHVvnF0T; Sat, 25 Oct 2025 13:17:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1761391077; bh=4NvIhj9vk2wKrMeBxFqBm5W9goe8YypRXR6TDgExS7s=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=QiNWXidtwAu+bQgUFAifYtVFcwtjcDkHQPDlo2NPATjQ/gncEDChUaSeKD9+yY4wM FoPIu1YWkl3+TWlYAeKr4BqY6FvdtSIStyVEP2Ih2o2VgPNYx9ADg0CkeAnCJKWdol jjXfb1NDFVb8h7/sa0kXZQE15U33Z3ImRde81TOwqETj6LIizt99am+Yw2OOdiw3No aP4EC03SCXvp2jrRU43FILva6CHCVrkteiXgWFDYoAg5SLX/7t/+Vmao0XvXjXwifH WU3htYpSPGCervNcg88Hvoik/BiilfBKllJpCprCWpOrkCro99mOG5UCuGJu0JaTUz MtLZSotTxUqRA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 25 Oct 2025 13:17:57 +0200 X-ME-IP: 2a01:cb10:785:b00:8347:f260:7456:7662 From: Christophe JAILLET To: a.hindborg@kernel.org, leitao@debian.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 2/2] configfs: Constify ct_item_ops in struct config_item_type Date: Sat, 25 Oct 2025 13:15:38 +0200 Message-ID: X-Mailer: git-send-email 2.51.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make 'ct_item_ops' const in struct config_item_type. This allows constification of many structures which hold some function pointers. Signed-off-by: Christophe JAILLET Reviewed-by: Breno Leitao --- Compile tested only files that explicitly use ct_group_ops. The script used for that is: while IFS=3D read -r -d '' file; do obj=3D"${file%.c}.o" ; echo -e "\nCompiling $file" ; make "$obj" done < <(git grep --name-only -z ct_item_ops '*.c') --- fs/configfs/file.c | 2 +- include/linux/configfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/configfs/file.c b/fs/configfs/file.c index 0ad32150611e..affe4742bbb5 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -30,7 +30,7 @@ struct configfs_buffer { size_t count; loff_t pos; char * page; - struct configfs_item_operations * ops; + const struct configfs_item_operations *ops; struct mutex mutex; int needs_read_fill; bool read_in_progress; diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 31a7d7124460..ef65c75beeaa 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h @@ -64,7 +64,7 @@ extern void config_item_put(struct config_item *); =20 struct config_item_type { struct module *ct_owner; - struct configfs_item_operations *ct_item_ops; + const struct configfs_item_operations *ct_item_ops; const struct configfs_group_operations *ct_group_ops; struct configfs_attribute **ct_attrs; struct configfs_bin_attribute **ct_bin_attrs; --=20 2.51.0