From nobody Tue Apr 7 02:54:32 2026 Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (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 84B2E39F169 for ; Mon, 16 Mar 2026 15:11:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773673910; cv=none; b=nIKzQ9Cg4W8ZYLLwg1wmT+mf5PgX7ZzSQcQCR4MDoEQISJBd0ygWeZ8xIuHG8WjSmHgP0Pd/YfBk266koi5aNjETHgKB/b5RsI4zqYgrJQNNFNyxFGTPrUGMBsSIPxyXN+7ewWOOThH1RygLDjUMe1u2XFcG/D/neBSe1DPNPlk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773673910; c=relaxed/simple; bh=a7LjpIRLtduMI1slCOFjGjpplJ7F4DqyS9udlUVEVEo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZZh7o8n58/gyXkh7giR9QXh9AFnvn0yOaQzOJ2zBCYCAcAUML44eQhPJ6xYTYd0r8wz0keghbf/ZSRAbVpwhUgnHZ84p3GnniXGJCMyTB/h9774CnmyktZYfN5MygxRNiPAmhNaLZzEPpSVYnKW8mbs555iSuQPm1IvUtLeMrTE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alice0.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.221.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alice0.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-56b6c3e0166so2691215e0c.0 for ; Mon, 16 Mar 2026 08:11:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773673908; x=1774278708; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=b5u6dZoKz+wI1BLXz/khSv4YC5M+tZfUmqiPDGsRfLc=; b=EMz+tHN/c7mivTnmyEMed8Qeqjz95wZ2/uJmA6K1boyUO9quWnhqAx1AuUlOcsRwsu +imSIGaSETXg85OEH9769mRL6X1sxm07EZzCQbiumwgjXrpO1TtKOYlMxwbkMGLG9RJr 2erNaMHZSUT4VvmD2rZKI9ECPkABPqvi7UZkKuNFZHuCEjjJ2s+Sb5HHBJh+UD5+h+3W EGSL6Cj6WncDJ6dVk7q9Sqmn8aL11jOQdI/EvfWXL0zp3b6JILLLsKEriPKfLUMEnrQE 6EA4FHq+cktpaa6FaS4CzU66eGsFr7C34WmwdFs2mUcpsBW1P+N240GMJ25zzFuNWoZ6 rSWw== X-Forwarded-Encrypted: i=1; AJvYcCWYD5G8X8XcqybcADLo84CJzL1E4FbbRMG3YPvkx5hKotoICLlXgewXWDLKopoV2tipuQUV0taN38RrDjU=@vger.kernel.org X-Gm-Message-State: AOJu0YxHbYKw3yKCDdJHRXBAz+UqchUDL3siGtIkuWiLrJnoxX3P6byr 14tkDQCsb48TmAuVSVoWznDzdegp8j5+se08KqjbcmuMZblb/cqZNslX2yxVaCDEnghymA== X-Gm-Gg: ATEYQzwPYd5qcOSaU+/v9DjWA0lO8htNShY6oOD91++VoEBtOhzWhEBbBtHvQ0jPJSK 4o9C1FCHLjeWVu0vYI73KvDlSrY3O+Ehq+uEGwy5PkmCL4doFyjv4Hx0A8xtdCrg15sx+G6QHmg qNffbjuiJy1gOlzx6q+OFTYmbsvsPSA8HcB8WTriOFwu53k7TUpQ75lV0umlcQ8JpBCtj6Ae6uk qqDZYEkqJ6xXd4fWapCP2DeOc68WXeyiEWA2nyRz95fZkDIIRT/mNMG8+4txdJuHpl9CdGt0Y2u evC/lv03iEd3qKz4IRrPxss/Uc8BreiuwD+6WkpaCcQwJ8REebAJPjIqrse6BkTsAV9cVJqptT+ qanteNk/F1X541tGmuJZqY/b/MmdyEY80qf+DD6ALpzrovtqS7zzxSOnjVk9EaeAXyCIa2awutI 8LjWGdNHWi3IlR171H0Q== X-Received: by 2002:a05:6122:1251:b0:56b:7ec7:bcc6 with SMTP id 71dfb90a1353d-56b7ec7bf74mr1506388e0c.7.1773673908401; Mon, 16 Mar 2026 08:11:48 -0700 (PDT) Received: from W871.localdomain ([104.28.153.56]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-56b88bb5271sm1386273e0c.15.2026.03.16.08.11.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2026 08:11:45 -0700 (PDT) From: Fabricio Parra To: Gary Guo , Miguel Ojeda Cc: Boqun Feng , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Fabricio Parra Subject: [PATCH v2] rust: sync: completion: mark inline complete_all and wait_for_completion Date: Mon, 16 Mar 2026 11:10:56 -0400 Message-ID: <20260316151056.287-1-a@alice0.com> X-Mailer: git-send-email 2.53.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" When building the kernel using the llvm-22.1.0-rust-1.93.1-x86_64 toolchain provided by kernel.org with ARCH=3Dx86_64, the following symbols are generated: $ nm vmlinux | grep ' _R'.*Completion | rustfilt ffffffff81827930 T ::complete_all ffffffff81827950 T ::wait_for_complet= ion These Rust methods are thin wrappers around the C completion helpers `complete_all` and `wait_for_completion`. Mark them `#[inline]` to keep the wrapper pattern consistent with other small Rust helper methods. After applying this patch, the above command will produce no output. Link: https://github.com/Rust-for-Linux/linux/issues/1145 Suggested-by: Alice Ryhl Signed-off-by: Fabricio Parra Reviewed-by: Gary Guo --- v2: - Fixed malformed email header (RFC 5322) in the From line. rust/kernel/sync/completion.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/kernel/sync/completion.rs b/rust/kernel/sync/completion.rs index c50012a940a3..35ff049ff078 100644 --- a/rust/kernel/sync/completion.rs +++ b/rust/kernel/sync/completion.rs @@ -94,6 +94,7 @@ fn as_raw(&self) -> *mut bindings::completion { /// /// This method wakes up all tasks waiting on this completion; after t= his operation the /// completion is permanently done, i.e. signals all current and futur= e waiters. + #[inline] pub fn complete_all(&self) { // SAFETY: `self.as_raw()` is a pointer to a valid `struct complet= ion`. unsafe { bindings::complete_all(self.as_raw()) }; @@ -105,6 +106,7 @@ pub fn complete_all(&self) { /// timeout. /// /// See also [`Completion::complete_all`]. + #[inline] pub fn wait_for_completion(&self) { // SAFETY: `self.as_raw()` is a pointer to a valid `struct complet= ion`. unsafe { bindings::wait_for_completion(self.as_raw()) }; base-commit: 79e25710e7227228902d672417b552dd1d7e5d3b --=20 2.53.0