From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2821CD3439 for ; Wed, 6 May 2026 21:53:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1006B10EEDC; Wed, 6 May 2026 21:53:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="pCcSNroA"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 54F5210EED3 for ; Wed, 6 May 2026 21:53:43 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 346C2442B3; Wed, 6 May 2026 21:53:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCFD0C2BCB2; Wed, 6 May 2026 21:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778104423; bh=rJ9Zf42krWnw6GFHxY+YcEyrmhC+ZgJmklrrd85+jss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pCcSNroALL1xSHMZYPlVdmtM878HCCVaqIiIa7SXFqPg3QO8LXrVN0UIeXAACWsb2 3eZa+yTNX5aqqXWSbA/6P8FV2bbn9g9MPjQhrKmL7DBHKW9BK/AVe2kLp8vkm/sBas jXoCs+rS7WXRP2Or5zhlmF8oJVqLGs/y9+v9r6k5VXXrCtVIZsW+F7JS7TlV1mbFfu f4/bUiiAoJOGLFJISzHdLjFhO7uHF7WTGBL1PCHd15845vENxADZ6nK9SyEnqY+qd+ rFc5unDGBecf5nsvc3ANSVIJBrB2Y+eq4aFRH1YqllDyWbrwrMz0TWxWfJkVS/lWL4 UA965uYpRp9wQ== From: Danilo Krummrich To: gregkh@linuxfoundation.org, rafael@kernel.org, acourbot@nvidia.com, aliceryhl@google.com, david.m.ertman@intel.com, ira.weiny@intel.com, leon@kernel.org, viresh.kumar@linaro.org, m.wilczynski@samsung.com, ukleinek@kernel.org, bhelgaas@google.com, kwilczynski@kernel.org, abdiel.janulgue@gmail.com, robin.murphy@arm.com, markus.probst@posteo.de, ojeda@kernel.org, boqun@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org, a.hindborg@kernel.org, tmgross@umich.edu, igor.korotin@linux.dev, daniel.almeida@collabora.com Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org, linux-pwm@vger.kernel.org, linux-pci@vger.kernel.org, rust-for-linux@vger.kernel.org, Danilo Krummrich Subject: [PATCH v2 21/25] gpu: nova-core: rename 'a lifetime to 'bound Date: Wed, 6 May 2026 23:50:57 +0200 Message-ID: <20260506215113.851360-22-dakr@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260506215113.851360-1-dakr@kernel.org> References: <20260506215113.851360-1-dakr@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Rename the generic lifetime parameter from 'a to 'bound in nova-core. This makes it explicit that the lifetime represents the device binding scope, consistent with the convention established by the HRT series. Signed-off-by: Danilo Krummrich --- drivers/gpu/nova-core/firmware/gsp.rs | 8 ++++---- drivers/gpu/nova-core/gpu.rs | 8 ++++---- drivers/gpu/nova-core/gsp/commands.rs | 10 +++++----- drivers/gpu/nova-core/gsp/fw/commands.rs | 4 +++- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs index 2fcc255c3bc8..9dbd88c55f7e 100644 --- a/drivers/gpu/nova-core/firmware/gsp.rs +++ b/drivers/gpu/nova-core/firmware/gsp.rs @@ -65,11 +65,11 @@ pub(crate) struct GspFirmware { impl GspFirmware { /// Loads the GSP firmware binaries, map them into `dev`'s address-space, and creates the page /// tables expected by the GSP bootloader to load it. - pub(crate) fn new<'a>( - dev: &'a device::Device, + pub(crate) fn new<'bound>( + dev: &'bound device::Device, chipset: Chipset, - ver: &'a str, - ) -> impl PinInit + 'a { + ver: &'bound str, + ) -> impl PinInit + 'bound { pin_init::pin_init_scope(move || { let firmware = super::request_firmware(dev, chipset, "gsp", ver)?; diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index 0f6fe9a1b955..9288b30fe4c3 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -241,11 +241,11 @@ pub(crate) struct Gpu { } impl Gpu { - pub(crate) fn new<'a>( - pdev: &'a pci::Device, + pub(crate) fn new<'bound>( + pdev: &'bound pci::Device, devres_bar: Arc>, - bar: &'a Bar0, - ) -> impl PinInit + 'a { + bar: &'bound Bar0, + ) -> impl PinInit + 'bound { try_pin_init!(Self { spec: Spec::new(pdev.as_ref(), bar).inspect(|spec| { dev_info!(pdev,"NVIDIA ({})\n", spec); diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs index c89c7b57a751..0da5b92f4b27 100644 --- a/drivers/gpu/nova-core/gsp/commands.rs +++ b/drivers/gpu/nova-core/gsp/commands.rs @@ -35,18 +35,18 @@ }; /// The `GspSetSystemInfo` command. -pub(crate) struct SetSystemInfo<'a> { - pdev: &'a pci::Device, +pub(crate) struct SetSystemInfo<'bound> { + pdev: &'bound pci::Device, } -impl<'a> SetSystemInfo<'a> { +impl<'bound> SetSystemInfo<'bound> { /// Creates a new `GspSetSystemInfo` command using the parameters of `pdev`. - pub(crate) fn new(pdev: &'a pci::Device) -> Self { + pub(crate) fn new(pdev: &'bound pci::Device) -> Self { Self { pdev } } } -impl<'a> CommandToGsp for SetSystemInfo<'a> { +impl<'bound> CommandToGsp for SetSystemInfo<'bound> { const FUNCTION: MsgFunction = MsgFunction::GspSetSystemInfo; type Command = GspSetSystemInfo; type Reply = NoReply; diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs index db46276430be..d3ef7ecdd73e 100644 --- a/drivers/gpu/nova-core/gsp/fw/commands.rs +++ b/drivers/gpu/nova-core/gsp/fw/commands.rs @@ -24,7 +24,9 @@ pub(crate) struct GspSetSystemInfo { impl GspSetSystemInfo { /// Returns an in-place initializer for the `GspSetSystemInfo` command. #[allow(non_snake_case)] - pub(crate) fn init<'a>(dev: &'a pci::Device) -> impl Init + 'a { + pub(crate) fn init<'bound>( + dev: &'bound pci::Device, + ) -> impl Init + 'bound { type InnerGspSystemInfo = bindings::GspSystemInfo; let init_inner = try_init!(InnerGspSystemInfo { gpuPhysAddr: dev.resource_start(0)?, -- 2.54.0