From nobody Tue Dec 2 01:04:44 2025 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 3995528D8D0 for ; Sun, 23 Nov 2025 09:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763889977; cv=none; b=gttWXBY99PYqm3PKk2vEppvA2U3VjLNgolRje8tq2fsr1vkZrNyGqNuM0nbGnXSRx1D5qDbjhTkz1rwDqQSLP3zhlq5QFlT436OL5oC8LMzj/u1W+nqVUTycWltSYz8Sfu9+LG33AYI8mDegroFxySYFKS3l3Um6B7od7Oq0/7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763889977; c=relaxed/simple; bh=hhfQrE5YZ3yIRunnDvDHhBDE/s9hEASQ0QrKj2P8WKM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J7px/red8plZZu0A7F84RS9c21ismfTKbUlJMZfdfIYH6cY3hKqxT7UR2rItU3thIMXpQErAGISxjo1bIdsGSxnBEgEOK2tAwAK8z1w2tS7ZNG6zklYBodh39zIjHnm+ojoFHGoEQrRj8rF81vcJb5QYjiY+cwTkdjxg1XA8ZTg= 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=kiAV9r6F; arc=none smtp.client-ip=209.85.214.172 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="kiAV9r6F" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2958db8ae4fso33214115ad.2 for ; Sun, 23 Nov 2025 01:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763889973; x=1764494773; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c+x/h+SXCaTPKwxrPZvI12zlFOq5qesnIaQFOZDdW/8=; b=kiAV9r6FmOiWCtQ6Ze4vNr0M53qDbdtc3997baVpmjkm3EjjJVhEOmQzAttiz4wMMl tgKKFYLpvHaOYEvfgplEMbF+CvFCdvcWHGHDCQAL8x5z2VFYXkrzF4IqZIuoBivGtJbr CckWkDH8RLjnhKTWJFT1rtOUddaoKCymFuqE+rkmFfPr5BQOOIFNQZihmuyOP29GFQ7x Yu8y740jqi+Qdh0CVdvt6i8VBs4JpB89zhMckAEzb6WvZ2hVGnCDUnBhwPkwEEEPY2Jf vqKwe29WtM2Yqn5TeLV5rt/AoNHLEifWSXzPnBrBzHKj8HJWO0QYNwifucYtF7Heg7aI Ablw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763889973; x=1764494773; 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=c+x/h+SXCaTPKwxrPZvI12zlFOq5qesnIaQFOZDdW/8=; b=nIoZu57ZGX4Rj+GnwnfPShYkGf9bM1STtyntVTE9eyLAFOuD7PKcrAsawcVy4sGGvZ hy/o/HvMymWgsYg04hbOqZ6wl3y6bo49TSlrJw7l/OqqpUeFdTQ8b4rTGRTBy0u7cVF5 FpLfP+Pbc8bUiZGpXtu4lA7zeggkD+M6WShbLBPEb/td6dCVfcwFBw1Jz20T78jKfX06 xeTtES+mr4+2eiY7pursVKaSAmJkSewZFRgEzdDQCTdCI0/Scj+ttF9P7T8ec7eGVAat AoVom01f+/Xu2mC6YAylmtzrODU149KLicqiTUjpWgfDUhhQZPz5cAHyRGdtXTc7blpj cuLA== X-Forwarded-Encrypted: i=1; AJvYcCXgrVn0v15wes3tyVu9zwlabDw48L4ZuVUghDxxLqJyOVQD4grZEhJpmpg3vozHOzY0KtdpZFPFU8z4LEQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxdE3d9qMp1bZLen/OoEEShUcO9tECwUPiXgFtu+oR0hVskessa pzGSy7d1ejNazjKlSjkRf6qvsw1y5mAhUrYZ+eLuYkwe1SaIsmVxgBMr X-Gm-Gg: ASbGncthAOZ2RaHjeqPPR9hjreLlUUjViF5AqOa4UJjbPRkKRGEziMHzWs0LWGX5adO aRwr3Zym4WQy5e5NS+4xcrvsabo2DefYyX9VmiaK71P69QL9v7FZY9dPnZDAbJL9xrVXK4Swalc 2tPyjZyMiVJlaLAx6HuZuu8JiwEjBd7DX6vai52KO2GaH5CQfSeUJD1e8kTwGUv03RratolpmS4 0dSo5IkkZQXxbfVsTVXRRpS1NCX9N2h6UDg1psLpJCPlSEfUUZ9P8Ajuot37T85BL26xsahtERB 99JgwRIi8yhqwEwJOElYNRQ6VcHb7p4zOTkFHSFDzJvfcBb0rd7wmjslRNCx0iQvgYsTkdLNVY+ I0JPykCE9ExoSkOkmnzbz7OVzqv+vxeLeui51VGf7EDc0DTub3AMNEy+630n1FLXmCaLzF/Umf3 kyb2QgzMBw4yNKLq1VhAreLrY2HQ== X-Google-Smtp-Source: AGHT+IFvuN898s0PRn7IHqlJzrCusouHL8HLAX1/JMZBn/PsKfoSrrGmFHNZ/OFvx15QZ7pZgA79MQ== X-Received: by 2002:a17:903:3c30:b0:298:8a9:766a with SMTP id d9443c01a7336-29b6c6b2e57mr86965995ad.53.1763889973533; Sun, 23 Nov 2025 01:26:13 -0800 (PST) Received: from shankari-IdeaPad.. ([103.24.60.188]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29b5b138c08sm100811105ad.25.2025.11.23.01.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Nov 2025 01:26:13 -0800 (PST) From: Shankari Anand To: Greg Kroah-Hartman , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Carlos Llamas , Suren Baghdasaryan , Danilo Krummrich , Alice Ryhl , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Alexandre Courbot , "Rafael J . Wysocki" , Miguel Ojeda , Alex Gaynor , Igor Korotin , Michal Wilczynski Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Daniel Almeida , Abdiel Janulgue , Robin Murphy , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-pwm@vger.kernel.org, Shankari Anand Subject: [PATCH 03/10] rust: device: Update ARef and AlwaysRefCounted imports from sync::aref Date: Sun, 23 Nov 2025 14:54:31 +0530 Message-Id: <20251123092438.182251-4-shankari.ak0208@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251123092438.182251-1-shankari.ak0208@gmail.com> References: <20251123092438.182251-1-shankari.ak0208@gmail.com> 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" Update call sites to import `ARef` and `AlwaysRefCounted` from `sync::aref` instead of `types`. This aligns with the ongoing effort to move `ARef` and `AlwaysRefCounted` to sync. Suggested-by: Benno Lossin Link: https://github.com/Rust-for-Linux/linux/issues/1173 Signed-off-by: Shankari Anand --- rust/kernel/device.rs | 4 ++-- rust/kernel/device/property.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs index c79be2e2bfe3..21bde8d95185 100644 --- a/rust/kernel/device.rs +++ b/rust/kernel/device.rs @@ -158,7 +158,7 @@ /// `bindings::device::release` is valid to be called from any thread, hen= ce `ARef` can be /// dropped from any thread. /// -/// [`AlwaysRefCounted`]: kernel::types::AlwaysRefCounted +/// [`AlwaysRefCounted`]: kernel::sync::aref::AlwaysRefCounted /// [`impl_device_context_deref`]: kernel::impl_device_context_deref /// [`pci::Device`]: kernel::pci::Device /// [`platform::Device`]: kernel::platform::Device @@ -540,7 +540,7 @@ pub trait DeviceContext: private::Sealed {} /// [`Device`]. It is the only [`DeviceContext`] for which it is v= alid to implement /// [`AlwaysRefCounted`] for. /// -/// [`AlwaysRefCounted`]: kernel::types::AlwaysRefCounted +/// [`AlwaysRefCounted`]: kernel::sync::aref::AlwaysRefCounted pub struct Normal; =20 /// The [`Core`] context is the context of a bus specific device when it a= ppears as argument of diff --git a/rust/kernel/device/property.rs b/rust/kernel/device/property.rs index 3a332a8c53a9..413221817ef1 100644 --- a/rust/kernel/device/property.rs +++ b/rust/kernel/device/property.rs @@ -14,7 +14,8 @@ fmt, prelude::*, str::{CStr, CString}, - types::{ARef, Opaque}, + sync::aref::ARef, + types::Opaque, }; =20 /// A reference-counted fwnode_handle. @@ -359,7 +360,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Resul= t { } =20 // SAFETY: Instances of `FwNode` are always reference-counted. -unsafe impl crate::types::AlwaysRefCounted for FwNode { +unsafe impl crate::sync::aref::AlwaysRefCounted for FwNode { fn inc_ref(&self) { // SAFETY: The existence of a shared reference guarantees that the // refcount is non-zero. --=20 2.34.1