From nobody Sun Feb 8 03:27:22 2026 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (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 304B72D0C94 for ; Fri, 2 Jan 2026 22:21:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767392482; cv=none; b=RM9N/zQHLEuiJl9+xjA6NEE55lqgBaIfDog5hvejOk/7sIfDLz7c0nM486pCzXMUsHHaK0iEzeWLmP+RDL/tl9disWCWydRGTJDc8GV3ifDUYf52CE0eQqkfLhEUDPhx5XKGdznSWwFDBFv8oSFC1ZNQcnjKE4TSOw0q9IZFwR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767392482; c=relaxed/simple; bh=BXnDH38sAKTaU6fZXWIje2HtBe6o+6O97pyAsFykX10=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qtvoht9Ne0N+B/sPx1tnOV42bFLiXIwBlvS1+R+rCdSfX9htax4aG9z8RaFm1RrY6FqJPbv3rlND+wAVCS2gsf1fNCv4ZjZY2kjySLZv7cfUuj2hNk37Qf+UlSF1mKAFduysJupEUda287IM+VhEr3cmaEKE3sFXAKRb1ljJgPU= 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=dXgqkPe9; arc=none smtp.client-ip=209.85.222.46 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="dXgqkPe9" Received: by mail-ua1-f46.google.com with SMTP id a1e0cc1a2514c-93f5905e60eso7841287241.0 for ; Fri, 02 Jan 2026 14:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767392480; x=1767997280; 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=r6eDZoYciOr2lYVwtxpxq+97yZ/JvKudSVZ9w95niiU=; b=dXgqkPe9JSbpHoLosfRagUwzeQ+q1XYD3zZmxZHylzey/Q3NZDO4FCnmk29F192hh5 524czZ3RyW2MyGtsc9Y6XZQ0HBXOiKJ8v7QoCk570rTL9SelsQvvmYUEqRFoVlcpHKGa N1X4mNtlxRlZ6+ky+s8XUZOTt70nC3WWCF1rmw0fJWqub+e67GNzUsVUHAbPGVCMRIyi kXvZCSW2I2RDGeIb1spMxH132blEi1bPgK1ru5sTMnfpCFc8uDoou5taSMVrsawP1UMV nQ7a1eN9d1My+e+NQpC1eVCjw6NZXWkalupAPXjBKj6Y/4NSARBMHb1o1SmQGbzCgg95 RyFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767392480; x=1767997280; 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=r6eDZoYciOr2lYVwtxpxq+97yZ/JvKudSVZ9w95niiU=; b=RPFB01/4cAT3060TtOk7YXmNgKhxxurqB5Os7dORgZuuG+pMFAxR3p0SlqRxAY75cv 8JbBEEr4MipodVl048csGWLHw0cGY1h+kyT74p4XP5Ec5AuokcQ/zX3QupGm3KPEHNoZ lI+b1Y9juSOO4VO+FIWxBtptiGahUlrEuzCxX6XZcsAz1V0Jjd7Dg2FHyDIPeDDjQU0S a+Pt+oSc/q7HOmA0tVbRvQloe2e6rAPQSN/EBcZ6WJ9nkeivS5stzn0M/xLXV7SxPZRJ Zwlj+f6lRyVXFQyQo89mph2H6QytrZV+FK2mBIojwtZNNST4yjZ6iwnklvrtmzAiyWTq yvLA== X-Forwarded-Encrypted: i=1; AJvYcCWDqoAW0jKAt+Mc+8bZOwW1lkQLuMJaOTPIhfCrpoDO9PIeojaFyoeSZIZ6U4sk9SiB24S3H4ZrPr2C7Y8=@vger.kernel.org X-Gm-Message-State: AOJu0YyOQHJon2E8EHsKdAYK2+Za/vgShAKzrEDM6CGjppugnx1b5WRn +BkqcFiCe5R5Vp3bY1Kz1+2aWDBqxe+YFjq8MYsE0nICawyoX38xU8eRaXOiBA== X-Gm-Gg: AY/fxX6dliAbez8PxyWOhiAIbglgCeG+uB/GW7cH6QWFe6QpWxatckW77NNaiGRLZog nqgltfqXynbyQlw6zuksQdQxmAZRb9+GmVjMhVjSkhBULx85hVTO1zWMMZu5abMmJt+NuxKsD0q +tHhcumIaU7mXNCwESZgrjwjQLxdFXQFc+St42bVRtHpiJidoeYUgnQsCgV0ECMNs2Dv3SfzLTh fw306511yg5+zPkhzkY95kJx2w7OESSrJDZnygbxwZi0AveDZzIKECnG9H38Mojocaw2JzlJsms Ipk5/HTo0QwSZFd3fVw+8SVpb/ZKtq2RIRQydo2qDC2JSEAnBs9jt5M4lHFP91723Drefh03+ns GwhkvYgMUbZTB6w/whHfEy2vfxmI/U32cZ2NndGuOlTSzXdMtrQA2N4eSUy7S1PbmrUONqYeX27 k/3c9L8k0IhT2r4cxQ6opc8XIaVVQveg== X-Google-Smtp-Source: AGHT+IGIsARfCgd5//D4UmLiREc1aDWqV7PK9qWSlWBBWPowHyvTYCk6XncFLI8Z8N2XnWEey2jwoQ== X-Received: by 2002:a05:6a00:430a:b0:7a2:7bdd:cbe8 with SMTP id d2e1a72fcca58-7ff655b041bmr34350824b3a.18.1767385706150; Fri, 02 Jan 2026 12:28:26 -0800 (PST) Received: from shankari-IdeaPad.. ([2409:40f2:2123:b1fb:b93b:b5b4:2357:c53]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7ff7e88cd71sm41163964b3a.64.2026.01.02.12.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jan 2026 12:28:25 -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, rust-for-linux@vger.kernel.org, Shankari Anand Subject: [PATCH v2 2/4] rust: i2c: Update ARef and AlwaysRefCounted imports to use sync::aref Date: Sat, 3 Jan 2026 01:57:12 +0530 Message-Id: <20260102202714.184223-3-shankari.ak0208@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260102202714.184223-1-shankari.ak0208@gmail.com> References: <20260102202714.184223-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 in `i2c.rs` 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 Acked-by: Igor Korotin --- v1 -> v2: Used the direct module name instead of including the path again, re-worded the commit title to rust: i2c: and carry-forwarded the Acked-by tag. Link of v1: https://lore.kernel.org/all/20251123092438.182251-6-shankari.ak= 0208@gmail.com/ --- rust/kernel/i2c.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rust/kernel/i2c.rs b/rust/kernel/i2c.rs index 491e6cc25cf4..9f5f18792916 100644 --- a/rust/kernel/i2c.rs +++ b/rust/kernel/i2c.rs @@ -16,10 +16,8 @@ error::*, of, prelude::*, - types::{ - AlwaysRefCounted, - Opaque, // - }, // + sync::aref::AlwaysRefCounted, + types::Opaque, // }; =20 use core::{ @@ -31,7 +29,7 @@ }, // }; =20 -use kernel::types::ARef; +use kernel::sync::aref::ARef; =20 /// An I2C device id table. #[repr(transparent)] @@ -407,7 +405,7 @@ pub fn get(index: i32) -> Result> { kernel::impl_device_context_into_aref!(I2cAdapter); =20 // SAFETY: Instances of `I2cAdapter` are always reference-counted. -unsafe impl crate::types::AlwaysRefCounted for I2cAdapter { +unsafe impl AlwaysRefCounted for I2cAdapter { fn inc_ref(&self) { // SAFETY: The existence of a shared reference guarantees that the= refcount is non-zero. unsafe { bindings::i2c_get_adapter(self.index()) }; --=20 2.34.1