From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 CADEA28B4F0 for ; Sat, 3 Jan 2026 20:20:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767471642; cv=none; b=HQ/WsG0hEQPjnHv8Vxgm4DaFaQah5xFv8yjXsDEagc0wzUpfJd6CGeD9hfTZRFmaXO3B9G4vWM7Qe5UwtF4NbKyUozj3ke4+aWCrVm8+w5FhvMeY/KwM1KHMAdKcIdQxCPVXl+nU+wt3ajSP/D2UMFOhyCtCwuIGoBBSpaNPeME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767471642; c=relaxed/simple; bh=5HMr5QJ2oE3kULBX7QCLd2NMoxwWzNwYt5mGuGiHwew=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JWQyxzGzFgNcQaCNQD7punBs91r0Tk/djzbv3Z/pWN58gI2q4wM6NVxTUyIUGqVw8YGeGWJ2rPQxdiBxpCy2cNr95YQ2XrUEsSD9E8bM5jY0pySjueTt8QTD7b6ezBcxVr2TLPYKjdxsIy0zmPb2rPaiNPn3WyJDW5A6L7p3IQ4= 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=Cne3ZWcX; arc=none smtp.client-ip=209.85.214.177 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="Cne3ZWcX" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-29f1bc40b35so231123265ad.2 for ; Sat, 03 Jan 2026 12:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767471640; x=1768076440; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EtsB8cTNLiViD0x12Gv28T9z9GvkLx2I4rkvj2Cl/LY=; b=Cne3ZWcXdfJIp9XszifKEW4Qbr/UGoXAENOhuTDDJeiDOMNjhlMfRMEpagk9+jxGlT HbXalG4Vaw7xgDIptpbtbXCI84fzP4/s1qg/x/SG3udQJwyNWuTi9G8HQMBVzAHZHxlf 4G5UUtvaihP3OWUoLfa3cCknB+T1fk1e5alRm94H2K56Z1fX0gcTUGl41IYt3h/M5w4Z J9m0elwv8vrsSnKT4Veu0gSatWqkx81WYB6hUpyV34Fn4PdETM8eZgGI5B/Srcvd22Ls mT0QwJDIdD9EKNyW4rexXV80KPwYxdjBkHGUW36PFJKWYfahyYUt0C7ZWr9Q91DlwhBf sC+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767471640; x=1768076440; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EtsB8cTNLiViD0x12Gv28T9z9GvkLx2I4rkvj2Cl/LY=; b=hZt0U2UwdEqMi67kvwUsS5a3b+Yf7lc8/dBy486FAFILyw+okH3l5mT+WeiWRfUvFM js6Uyy//cd6HaoV/GJVi5nT5xmsVl0/C1TG5nRxYBLfmoxg3Vc20TRdSzqS1w/1iJi9C lZXobsE80VXEinCNkR1rpowgn3Kvg30yDIJug1qLmmlMTs4U2+NOJoCN9ZLu0EUMNxUC vYwZjDNK9ga4sWoFxNRHWkdxfQRPhKRUI2IkUt2OBLtPw/e+oEyc4h7yNMbtf8ZPFm7a NW2/VmFwFzD+ri9IRgesTHB2Q577B4fUgGRAvCYbXPW+ZoFDGxO7dPzJ7L/ErlhZ03LB lNoA== X-Forwarded-Encrypted: i=1; AJvYcCUa+LKa4B9qq1Zhm0saJimMyk8zn8VQqj9BuFVwher2Q8eVmnywg71ywAwNxzAPGtoTjKhWvgahp5mRjLw=@vger.kernel.org X-Gm-Message-State: AOJu0YxMPwTYqTAPyoAna25rB4tUorDcizdPoJ3pPP8p+/m0X8M8pK5N HfVPeZtwQRcr4EYaz0onegX2BrIiubWe6r7DfOcUjV4U9ZG9c87d5j8DnzlLFJoI X-Gm-Gg: AY/fxX5wMxAwTUAeErCPAKXG0ak5MY0x6Q3kEQ7lOBYBjBF8gLQUWekYur4vpUHlqfg PDqrx62b1KH4vX5mcAI6yUs0xw4GhR7I82tRU2A7InuUSNfgTWQm5r+AGL9nbEc1QKF5r0Pdo8M glXgm7udy8BtvRnegeFZq0Z8eeU3+nRpypR6T2S6J5qg680V8MkylMk6eWqtbksQwkIFYU+gX4+ h55cl9L7fFnV/fooPJrX5FgzT2KXdUMuuh5bKKfKxLcDiuirTcI8VTAt9xB4kQkGFm4xE+yg/XO hlfZk27tT+dYneoQDZfHhhIETpkB6/2mNOEjbrWooIt54+awT0TszOS5AKtVN2byfMc0MurZSZy ekBOrVUe1VrIBvx3KSysphXT8Qpnn6mcqBJSBLlKmhjG6EDUIJwM9BN1lvSp7jiPhnQeDxy8Jdt TZwnhEYvKWmdugrdWFoyE/EXL/gcZq29uqAJplTiNYgBslyRC7ByY= X-Google-Smtp-Source: AGHT+IFn0QsPNbi03S3ptqNGcuaTkVlhDBXbsgpPpfC8g+ldSq59Ldn2uQL7XT0Qm5h+gludC7EqVw== X-Received: by 2002:a17:902:ec90:b0:297:e59c:63cc with SMTP id d9443c01a7336-2a2f2737be9mr463217395ad.35.1767465973396; Sat, 03 Jan 2026 10:46:13 -0800 (PST) Received: from [100.80.119.234] ([146.70.250.8]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a2f3d4cb30sm413509595ad.66.2026.01.03.10.46.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Jan 2026 10:46:12 -0800 (PST) Message-ID: Date: Sat, 3 Jan 2026 18:45:59 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/4] rust: i2c: Update ARef and AlwaysRefCounted imports to use sync::aref To: Shankari Anand , Greg Kroah-Hartman , =?UTF-8?Q?Arve_Hj=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 , Michal Wilczynski Cc: Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , Daniel Almeida , Abdiel Janulgue , Robin Murphy , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org References: <20260102202714.184223-1-shankari.ak0208@gmail.com> <20260102202714.184223-3-shankari.ak0208@gmail.com> Content-Language: en-US From: Igor Korotin In-Reply-To: <20260102202714.184223-3-shankari.ak0208@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/2/2026 8:27 PM, Shankari Anand wrote: > 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.ak0208@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, // > }; > > use core::{ > @@ -31,7 +29,7 @@ > }, // > }; > > -use kernel::types::ARef; > +use kernel::sync::aref::ARef; > > /// An I2C device id table. > #[repr(transparent)] > @@ -407,7 +405,7 @@ pub fn get(index: i32) -> Result> { > kernel::impl_device_context_into_aref!(I2cAdapter); > > // 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()) }; > Acked-by: Igor Korotin Since I still don’t yet have a public kernel tree, I’d appreciate it if someone could pick this up through their tree. Thanks Igor