From nobody Tue Dec 2 01:04:41 2025 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 E6A35176ADE for ; Sun, 23 Nov 2025 09:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763890002; cv=none; b=Vd1gfS5RrBhSGNevBl50vsk4GCR0Ns2bPUDgXL/1GGAmfCtsvTqLySdKexswGN1WCH/KgXYZLc06rDTymNIRuJotqpTEnatBciYNx7hjr+BepvcWlYs6SRs4f/H2xIA/L71aqbjLggUv1G+ok8yZacogO3SCNoJM5f8nLPX8KHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763890002; c=relaxed/simple; bh=vKoO79hHEPcCQYl/tNMLa4IXudiHam4RZkBRwZbei0g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CAVf9xq1cbPIa933EcAQ08rE8AGj68Oqy7etjU3Ux7BXR9PKFhIDw1aHYOufBoqf5gm9ap12Ln8UNctnohwyWsRunb4ecNJimMB77tv5q5DYD9UWqGXr1cv9rirSo55PGvG577yAetin7cBgPC5iQ8OmhdvSjWg5VTD5+lH/ZNg= 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=l1syOFK/; arc=none smtp.client-ip=209.85.214.175 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="l1syOFK/" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2955623e6faso39459515ad.1 for ; Sun, 23 Nov 2025 01:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763890000; x=1764494800; 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=HepyoJQ30V+nS3WwhUyswnLGOzdzEO2vo/wcuCFozBE=; b=l1syOFK/G37q9PN7BrZKA9mj4Be5qzWE5IlcmClTr8OeaMahODUx21koQqvABB6wCX 8ClhO7CfqhHbFVZjh0pJT+jBL88ySAgO64dYzaPbJHiMFelNsX4PfV/qde5i6TjfTyVT k0DLwAiciToHUtYEYYj7TqTUHtYbiLMyguYVVbnt2M5et6ewgrZVDL2mQETplvbm43+W BUCFARN9c+mRQj2At0Pq8OX15gmydPNXTzK56E38OEBL+JwB9a3Fd6kBNW83saevUhoM VE+HTbAmP8PbY1x/9cEH+ZhpKxUemc0oFlwNc0bCpvTUn6oOFJ3G0vBboNZDiZqqWSp1 3/kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763890000; x=1764494800; 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=HepyoJQ30V+nS3WwhUyswnLGOzdzEO2vo/wcuCFozBE=; b=ql8T0sdszjtnYxjDuzXXC58Y/bbv8pM4gRpzfcStcqmayrV4Fnaf5zBYYDFuvN0okS SEas+VbRP3QyN9oZmYe+RnlELzsGcyV3JEqLL0PxrOAlTeXwAzcTDKMOduJDYAd4R2Ms bz3czWz+7OU2VOCqhGpMtDmKLIZ6Ee9G+ovwI7TAhR8SOZqvidYckQuO36OjzC9bhw2N laB4HJaE37Pld8PTKuzDUvvqVoJpZY127fXOqmKcTinrm352Nn4848264dzzQG19Q1yZ FUpDhQPVh/5Dm6JGvqHfrjstJ+Nr4GdVXTX30i7niCDFFnmbgVz4zfZ7W+T4+iVWJbsG iK+w== X-Forwarded-Encrypted: i=1; AJvYcCXsFnfVFhWNWp+/ZHpPw+7A4LeGCT8+sxii0U3TKwHc6cChws/sIS7uIsTSWrTgvHY8qpObIyL1tukIFIU=@vger.kernel.org X-Gm-Message-State: AOJu0Yxop2ZUXw0p6cceqOb1JSoJvf63eEmcsyUZeSgdqz8kLLezfBCU DmZOdpn1qLgHlPhrt2RKUDGAWsEfo3W7B2MSxjcJkghqA0NUORunvAKW X-Gm-Gg: ASbGnctJ4jy+kHKx3WQWLWR4MK2lCFij3t00TB4GGHezcGynfCC+VQ2QLDZh2zf5wM6 MLWdiiFIZubhgo3GNb3B9/zMuvPfVH8F4iX3tf3ExflxyRbXHyiABda4+HeRcp3IbByKjkDto/D jXh9BpyRGeiGoCazMmol65NeUsBSjUG/bgSiDVEl3NJRA1AM23+PejbSMtBQKMWbFkBBvAb2HuY Twn/nwvgTdlr7oOUWZHphGacifI3ZTi2koh48S3e5QIP9KJKncidOxkxg+8VQZNY5csN3n8tU/S HVmr/3a9HuUWiqoReIS8Z1FRLkNOoyN7r0Mx8kUT6Jsqlgx4Ra/PBvnAKcudKF5/XYocntOp4OF c6DnAVeSprxuFQ4MFEvPZFvGCYioI/5BW9EywuPr8KP6g+xmdjTuj/J631ujhcpeOMr00RsRRRC fC2oXpvZnkJzf/Dzjp5jPcACuabw== X-Google-Smtp-Source: AGHT+IHnc+TnFjT4Ewq3NCmcVSOlFxFcCR7lWrTNRkJuldxiSn0BMR95iGNmXPyBh157L0RjhglO7g== X-Received: by 2002:a17:903:2c06:b0:295:6427:87d4 with SMTP id d9443c01a7336-29b6bf77fedmr93037125ad.50.1763890000307; Sun, 23 Nov 2025 01:26:40 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Nov 2025 01:26:39 -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 05/10] rust: kernel: Update ARef and AlwaysRefCounted imports to use sync::aref Date: Sun, 23 Nov 2025 14:54:33 +0530 Message-Id: <20251123092438.182251-6-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 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 --- 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 1aee46f59460..c50ca464d87c 100644 --- a/rust/kernel/i2c.rs +++ b/rust/kernel/i2c.rs @@ -17,10 +17,8 @@ of, prelude::*, str::CStrExt as _, - types::{ - AlwaysRefCounted, - Opaque, // - }, // + sync::aref::AlwaysRefCounted, + types::Opaque, // }; =20 use core::{ @@ -32,7 +30,7 @@ }, // }; =20 -use kernel::types::ARef; +use kernel::sync::aref::ARef; =20 /// An I2C device id table. #[repr(transparent)] @@ -408,7 +406,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 crate::sync::aref::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