From patchwork Tue Jan 7 03:50:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 13928181 X-Patchwork-Delegate: bhelgaas@google.com Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 040E01E9B09; Tue, 7 Jan 2025 03:52:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.155 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736221974; cv=none; b=i0ugWh1WIgem6sFyZSu2KqyeJODmCqJMyzOpzeYLVipxU+ZTMLvd3hRhIkylHt7f3S4CBo5r5ohkwNjJ/Ncq5cGKrmoDownti2QdX4jPmthSzGGTuCQW8APeQ+Ou4y+57GnpzC8GY2THHziZx3HzcKPAKfOWaPkRCxrnTRMkjL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736221974; c=relaxed/simple; bh=shclbD4m40GcjPTZvhzkGHRYbPJZG50Z0vKKKwDHAX8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dGL0Up7AQLuIlfKsFxoJwxhpwt5aM+gRYPBim4Owu9YHtWUisfo4NNtTQPsMS95l47Imr+RtwvNwi9JnZlBuoRJ8xLc0DIvFFyApI90l5epPajasgL+F22plgZBgc0k8wUwtRtsXnZGgi9R3cSldTUAve//bh6UMMrgoocMcoZA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me; spf=pass smtp.mailfrom=alistair23.me; dkim=pass (2048-bit key) header.d=alistair23.me header.i=@alistair23.me header.b=vxchY+0x; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Wz7tAAC9; arc=none smtp.client-ip=202.12.124.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alistair23.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alistair23.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alistair23.me header.i=@alistair23.me header.b="vxchY+0x"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Wz7tAAC9" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id A1AD92540194; Mon, 6 Jan 2025 22:52:49 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Mon, 06 Jan 2025 22:52:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1736221969; x= 1736308369; bh=nCGxfzjG/lwLPtxDK38RAhotjzRn8PNJB7cqZ+mSotE=; b=v xchY+0xFIbuXq4z2O4YAYAw6K+xQCWVVxwpgT7Gczfj7+IQO5GLjSaAt5lvfWIj9 JG3JFeS/XbnypYFSsxNU7vMZglzz2MphxWulevym4XA/6Aas/1Dyw+VemHzS8RhU GdGdq/W1UksGvaCFypim2mXt0dUXtSLHrqMPElTb1Zn8W6VAWVjikn5ZXIjjj7yv LINOtnqupkCqdrLrFVJRnQ3aaVdH2wiQemLinmCKuiBcyaVUcAM9thlLlITMqdcj cAghc2H8hLKrRhrKhrbi7lVDZCj9YA3QK700moDpWXy1IGatw83qMF78+qEHKLzV ZS+ua9n/yX/T4wRmopd/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1736221969; x=1736308369; bh=n CGxfzjG/lwLPtxDK38RAhotjzRn8PNJB7cqZ+mSotE=; b=Wz7tAAC9F5U8F4P58 +B9OB0HMTQmUw2M87tp8fwrHwSMf/9kSkfhVzc9KjinaaCdr9irB1SGNwT1C9vdx DmMuB0nv4UERzkvF7AyFf9nENazHZi8zCPZdRyea1EFCmODgX61w7VhU7sd/P3yY PVtf80Z3HCd/NumhbHEE4HTvMc4f1xcX8zMJyTIjgdfCLL/UbaNZ0bjmZBY7AxV4 Xc8yobamPy/xvBhaDNo3ZVsC9HX204glgZP2iBbiA278xorHjB4zl4ax0LFBdxwA OemUb3fIxh3BPZZEaXdQNSiFSvWYMVWIscnMSIIBAtIduGS83hFziGTfweeI2RaE C0pzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeguddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhrsegrlh hishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeeitdefkeetledvleevveeu ueejffeugfeuvdetkeevjeejueetudeftefhgfehheenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhr vdefrdhmvgdpnhgspghrtghpthhtohepvdefpdhmohguvgepshhmthhpohhuthdprhgtph htthhopegshhgvlhhgrggrshesghhoohhglhgvrdgtohhmpdhrtghpthhtoheprhhushht qdhfohhrqdhlihhnuhigsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplh hukhgrshesfihunhhnvghrrdguvgdprhgtphhtthhopehgrghrhiesghgrrhihghhuohdr nhgvthdprhgtphhtthhopegrkhhpmheslhhinhhugidqfhhouhhnuggrthhiohhnrdhorh hgpdhrtghpthhtohepthhmghhrohhsshesuhhmihgthhdrvgguuhdprhgtphhtthhopegs ohhquhhnrdhfvghnghesghhmrghilhdrtghomhdprhgtphhtthhopehojhgvuggrsehkvg hrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgtgihlsehvghgvrhdrkhgvrhhn vghlrdhorhhg X-ME-Proxy: Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 22:52:42 -0500 (EST) From: Alistair Francis To: bhelgaas@google.com, rust-for-linux@vger.kernel.org, lukas@wunner.de, gary@garyguo.net, akpm@linux-foundation.org, tmgross@umich.edu, boqun.feng@gmail.com, ojeda@kernel.org, linux-cxl@vger.kernel.org, bjorn3_gh@protonmail.com, a.hindborg@kernel.org, me@kloenk.dev, linux-kernel@vger.kernel.org, aliceryhl@google.com, alistair.francis@wdc.com, linux-pci@vger.kernel.org, benno.lossin@proton.me, alex.gaynor@gmail.com, Jonathan.Cameron@huawei.com Cc: alistair23@gmail.com, wilfred.mallawa@wdc.com, Alistair Francis , Dirk Behme Subject: [PATCH v5 10/11] rust: helpers: Remove some task helpers Date: Tue, 7 Jan 2025 13:50:57 +1000 Message-ID: <20250107035058.818539-11-alistair@alistair23.me> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250107035058.818539-1-alistair@alistair23.me> References: <20250107035058.818539-1-alistair@alistair23.me> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Now that we support wrap-static-fns we no longer need the custom helpers. Signed-off-by: Alistair Francis Tested-by: Dirk Behme --- rust/bindgen_static_functions | 3 +++ rust/helpers/task.c | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/rust/bindgen_static_functions b/rust/bindgen_static_functions index 9d6c44e277b5..8bc291a7a799 100644 --- a/rust/bindgen_static_functions +++ b/rust/bindgen_static_functions @@ -24,3 +24,6 @@ --allowlist-function spin_lock --allowlist-function spin_unlock --allowlist-function spin_trylock + +--allowlist-function get_task_struct +--allowlist-function put_task_struct diff --git a/rust/helpers/task.c b/rust/helpers/task.c index 31c33ea2dce6..38a7765d9915 100644 --- a/rust/helpers/task.c +++ b/rust/helpers/task.c @@ -7,16 +7,6 @@ struct task_struct *rust_helper_get_current(void) return current; } -void rust_helper_get_task_struct(struct task_struct *t) -{ - get_task_struct(t); -} - -void rust_helper_put_task_struct(struct task_struct *t) -{ - put_task_struct(t); -} - kuid_t rust_helper_task_uid(struct task_struct *task) { return task_uid(task);