From nobody Mon Feb 9 12:25:30 2026 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7143347BBE for ; Sat, 10 Jan 2026 15:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768057796; cv=none; b=MIa/Fhhpw8ZbhxguBxBiUooDSfPe4f8WyUvBwSF7wb/azzftKMonXFZWdOubeLs0WyxDuQgOZGImS6/kICKiOfk+3I6J63qiGPbiUyF7zbpQEBpfSX3TDwKSn4zIIQ9w7EuBhIQy5ns44/ApUKaeuGJGaDWazAKzmgJIPEmr0EM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768057796; c=relaxed/simple; bh=pfH3AGgm+K0TiaxJVDEaqs35RUJB1GsVoRO74Bd7vBY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NbuB+nhNFVvx/uKx/oPg1ZQgeffMNKwLQNhyLa8VpcRupWqGt+0eqKxqHnTdvSsRUwYjGZBnOA7WlIuS0RHMbkSb9/0aampTbz/JMYAaNKTQn2ZHfkHt/uR9jBXrUwGuud8yKYKWuQ3ar/y+0XVgAjgfSM226j66fC1Uc/ir6AM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DUzJ5XyC; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DUzJ5XyC" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-59b679cff1fso3996147e87.0 for ; Sat, 10 Jan 2026 07:09:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768057784; x=1768662584; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=QEO230ig7NJAkoe13wY9aF3OcdLkvsjJUe6hRkAMlIw=; b=DUzJ5XyCyDSe5px7b8/qIA1OjfRFUhfxcDpQ7/Yo/nvf9q45qfD3FAEK/vesX/vT3S gEUYThv/t+baQc2CURHqVI4jTSzZYZDj1Hwu2bNiyFXtOySEhhWsf8abOjQsR+LeDQwO dZVXIg4OcMyOGBJ4i/QZleBwBBtZ2DeObV9ypRfLWWEiZ4l3OMr1Lk+X5QJphQxvAaW8 ZwERNJY3S8Dk1nDhSE7o5wlSGZeW5qjOZGleA7i2pfP4lwHBNnzJUPYMX7o2l/e5xg5R wbduCaps4UqRzI/l9b18+4tum/DsqiyBJpBWrt8onTj+J7fBVDibTfF/C2V0cTdRAamM 2k/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768057784; x=1768662584; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=QEO230ig7NJAkoe13wY9aF3OcdLkvsjJUe6hRkAMlIw=; b=oG/1deVC1x1qlx5IiUcV6o7dNIfg6QNNOG0CPaMSHVJrYDSmuiR5ixVSi334yPIAti rGelTPJZZ0e3BWHDj+/OzJ6vhVsDJdFL/XBoJaAu8DEBuOeDNbEkVEwqe2RFXiNtAYh0 QDCIxQnuTzNe9/s6KPrcoCn77sTF/5cvoMJZaidhZqyOrZ5LePGkfmL2pAOa+Nga+QrW pScYTqV2T6AZH/wzZA4FjBSX+93Bv8227iDd7+oCnFLLqWwefvTLwxIpIn7e3AObppn4 PHT6Z7TUf5U9JWP6su9Id560l62dzjhRexqpjzGFpa7RiTmpS1JRLWstHhgPQj41Ytjv cEwA== X-Forwarded-Encrypted: i=1; AJvYcCUHKt8TjoWO1OecMpDqoHi4LqPK0Y1cv5xrXNcw/ctrTxwan5RL9eC4zJ3I+fqNGCP+f3XXsgHrAhLOSGo=@vger.kernel.org X-Gm-Message-State: AOJu0YxeobTodCVfmr1veC9uPfJ0/EkRtApSPmuLLEOU7zT1XVeXYY8d +dE+i3xRklqX7eF/CqvgXKAixAteKPDM9bJKnQ+fHCTzIE1ffXuXD7Uq X-Gm-Gg: AY/fxX5pIeIOMYqRJUs1al13e8y1OqSssikeWJ34zsl+GeubRS9oydJeIVOe+xDc9JM o5/0aYVHkU9KMfgWRdso8IeO4TNHrtiLA3i9shs1V7ASt6S+ZJBHxqXdkYbpYeE8BQRDzE1fixi wkAePMkdrVY01C+Wq/mGeFTpKX62Do9SxhdhSlH+B/OTI6rJAltWiNoa4ctvbL/oUpc2ZXpP5KY q4kL5w1/bb/DJ7Tttc9eoHasj7GgdU6euHgd35MJGuNuyPx+Z2QSiQJ23hR5OaLQeYOy+i/uxHq T/GXmfjht3jcqcn0q+Nr1DCB0jJLUuLlKU1nqqsznn8RagYj3d2H7FCu7eQBp4fbUYi78rHSvAD IXYT8Ua42vUJ5fgvoUZjUxXv7tKKs5wXUPcCgtQp93vhEsMIG8awZ2ng2//n06RFEq6hHv9FaLS +mqlP8+xAIEALwb+hrBXx/aJ91bskcYOMEHqG/nKhQb2M93cAd5dObsQwMbG6sHuuwdhOdYZyU X-Google-Smtp-Source: AGHT+IEIQmFQiF0ZLik1zsJlq+OUA/lbf5+EKmbrA0WWELNhEphwh4e3fJyxYtg4u5UlIhAQwIseJg== X-Received: by 2002:a05:6512:1052:b0:59b:7c9f:625e with SMTP id 2adb3069b0e04-59b7c9f62c2mr1936509e87.44.1768057784204; Sat, 10 Jan 2026 07:09:44 -0800 (PST) Received: from LT-5CG5341NQ4.nordic.imtech.com (37-33-148-7.bb.dnainternet.fi. [37.33.148.7]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59b75543a64sm2137059e87.49.2026.01.10.07.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jan 2026 07:09:43 -0800 (PST) From: Kari Argillander Date: Sat, 10 Jan 2026 17:08:12 +0200 Subject: [PATCH RFC v3 14/15] rust: remove kernel::ModuleMetadata Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260110-this_module_fix-v3-14-97a3d9c14e8b@gmail.com> References: <20260110-this_module_fix-v3-0-97a3d9c14e8b@gmail.com> In-Reply-To: <20260110-this_module_fix-v3-0-97a3d9c14e8b@gmail.com> To: Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Alexandre Courbot Cc: Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Kari Argillander X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768057742; l=1735; i=kari.argillander@gmail.com; s=20251219; h=from:subject:message-id; bh=pfH3AGgm+K0TiaxJVDEaqs35RUJB1GsVoRO74Bd7vBY=; b=NyjzfLzXSJdPJdEypMEaLFZ1UzScd7sLn91FWqga5fbZGrFtuuTya8mHIF9TK+GjZjdQY4J9f 0F7dL8GFLgbDaw+9kU8HkJChnr21OqYRxiKEYyWkXpspR6iPeBG1oC5 X-Developer-Key: i=kari.argillander@gmail.com; a=ed25519; pk=RwSxyhTpE3z4sywdDbIkC3q33ZQLNyhYWxT44iTY6r4= We have all information available also in THIS_MODULE. All users use that already so there is no users for this anymore so remove it. Signed-off-by: Kari Argillander --- rust/kernel/lib.rs | 6 ------ rust/macros/module.rs | 8 -------- 2 files changed, 14 deletions(-) diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index d6111a44fb3a..3acc60a83b09 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -201,12 +201,6 @@ fn init() -> impl pin_init::PinInit { } } =20 -/// Metadata attached to a [`Module`] or [`InPlaceModule`]. -pub trait ModuleMetadata { - /// The name of the module as specified in the `module!` macro. - const NAME: &'static crate::str::CStr; -} - /// Equivalent to `THIS_MODULE` in the C API. /// /// C header: [`include/linux/init.h`](srctree/include/linux/init.h) diff --git a/rust/macros/module.rs b/rust/macros/module.rs index 7473a377a3bd..97635aed1598 100644 --- a/rust/macros/module.rs +++ b/rust/macros/module.rs @@ -374,14 +374,6 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream { ::kernel::create_this_module!(\"{name}\"); =20 =20 - /// The `LocalModule` type is the type of the module created b= y `module!`, - /// `module_pci_driver!`, `module_platform_driver!`, etc. - type LocalModule =3D {type_}; - - impl ::kernel::ModuleMetadata for {type_} {{ - const NAME: &'static ::kernel::str::CStr =3D c\"{name}\"; - }} - // Double nested modules, since then nobody can access the pub= lic items inside. mod __module_init {{ mod __module_init {{ --=20 2.43.0