From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) (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 818903016F1 for ; Wed, 12 Nov 2025 10:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762944211; cv=none; b=kMst37wW68fXSx+D50p98kkDjmZMTq/ZcfAbTnd/aw6l2/euv8z5/KNESrQ1cSLdAOZmSdRl973tUZTAvJ+WU2YuwpY/IyY+9npp57XslRyjrvbwLZ+JsEGFI8Z2CAksdKC80mHX0zmP+/Lu0qV3nBS52E4MJSDO2uNz/SljoaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762944211; c=relaxed/simple; bh=qsGK2vvgIjSrGY79hbtJ2kdI3rL7jpuRQsUVkFhylGk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Ugfs5WGTgtoOnZx/zdhjiOEzwjPKjkSmA0KJC4FhN7eyC9ryQ9/HOPw1ED08BQNzB/OFqBP20PZGrcW+kno67LdbZe2NTIKAc+awP/1MaHirke1yKJpluV0NCPz1KM6ZcFvw1u6kTaXb1MUG7Z0zTfEJt9NGUt6np5/xZaET9tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RRkp8ueR; arc=none smtp.client-ip=209.85.221.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RRkp8ueR" Received: by mail-wr1-f74.google.com with SMTP id ffacd0b85a97d-42b2ffbba05so371911f8f.0 for ; Wed, 12 Nov 2025 02:43:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762944208; x=1763549008; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=qsGK2vvgIjSrGY79hbtJ2kdI3rL7jpuRQsUVkFhylGk=; b=RRkp8ueRJE/nY1igK+J4JZYEwrJIuOvz34QXWKjGmP9ySFhncNZLri8vZQe20BkDfD 4/xnkV0kICdPyaXJntv/kekQToDkEJyZvgW20j3UIlhO9YvxJ2HvGz3nh2U7kG6FTO8o CsS9bx0ZLU5FPpMKALyDmWKr3yjWqjpFM6HSYlIEJkFPTqkyRbIlkmTWCHH+WiSO4cNR NUw4Kkll4Wg4J9BlDkOLsPOe1tWRoFEUxabwUWjaZlF0Qj1zDlJop1WSvkSDRANy1A3A 8kH4md/8X27VJlJjvcj+tyVvbq+LRmABKOK4cX5RsV36iUmBzPZoOa6byImMoWU51b38 deWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762944208; x=1763549008; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=qsGK2vvgIjSrGY79hbtJ2kdI3rL7jpuRQsUVkFhylGk=; b=sKwilJOue1cQ9KJP0FCdtp7Uqou35rpqrFLYbHv9rtOGgK3SS3dI98PTeBNoVpdArV 74hd0/8L0nXJiYbJKXlv5YWoYpNXqhY5wuj+J7ZPDsb5+xWtmOMttMQ3eJc4I/1UaW8h xkDek01xhwVSGSS8d3AxKQ3U6UfAABD1Soy00WwgRtXv4KeuKq11iykE7iYTXWVTVoud 1Qkh4vsLNQyEc6ryoqU3iPiGLuSRSQ+1E7AYIX0ycxJVz1ceXynpugWHtV7QfrlDW55k IO3X6ExDhwz5SZ6KXnEPz13df26KeL/OLFmMAHT/MyZS3In7q9sL3aszII2VChxrkf1F ul6A== X-Forwarded-Encrypted: i=1; AJvYcCXkPETL3b3jP9VYyC+28vnqZLswWn2r2oI7q4YX4qabKy3StFBMv8Z0iOcx8lc0op0/NEOlRNZEl4GAzLG2Ow==@vger.kernel.org X-Gm-Message-State: AOJu0YxGAeZ7gS7zVb3zxoeIIYBQrCLyl0D+i14JWgd+fTwSExnwLJOJ 3783GC1QKW+8/RTufrDjaIoDNZTbpT+vxq509vN7G13++/zeRxyIsEQfelGl4G9Gz2t+Wy2xZ8j Izn9lCYreY7JiigqaPA== X-Google-Smtp-Source: AGHT+IHmCFXHpp5cauitqHBpDGeJg4dbeHWzIhTk4Pbjn82zVph0DB0Y4c5pbPV7FQxsGrBXCKpMvGCvcCH7RKM= X-Received: from wrbfp24.prod.google.com ([2002:a05:6000:2798:b0:42b:4843:f05d]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:144c:b0:42b:3bc4:16dc with SMTP id ffacd0b85a97d-42b4bb9c952mr2020672f8f.21.1762944208032; Wed, 12 Nov 2025 02:43:28 -0800 (PST) Date: Wed, 12 Nov 2025 10:43:26 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-resource-phys-typedefs-v2-0-538307384f82@google.com> Message-ID: Subject: Re: [PATCH v2 0/4] Rust: Fix typedefs for resource_size_t and phys_addr_t From: Alice Ryhl To: Miguel Ojeda Cc: Danilo Krummrich , Daniel Almeida , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Abdiel Janulgue , Robin Murphy , Greg Kroah-Hartman , "Rafael J. Wysocki" , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 12, 2025 at 10:24:45AM +0000, Alice Ryhl wrote: > On Wed, Nov 12, 2025 at 11:12:32AM +0100, Miguel Ojeda wrote: > > On Wed, Nov 12, 2025 at 10:49=E2=80=AFAM Alice Ryhl wrote: > > > > > > This changes ResourceSize to use the resource_size_t typedef (current= ly > > > ResourceSize is defined as phys_addr_t), and moves ResourceSize to > > > kernel::io and defines PhysAddr next to it. Any usage of ResourceSize= or > > > bindings::phys_addr_t that references a physical address is updated t= o > > > use the new PhysAddr typedef. > >=20 > > Should we have these as actual types instead of aliases? i.e. same > > discussion as for `Offset`. > >=20 > > If there is a change of these getting mixed up, then I think we should > > just pay that price (not necessarily now, of course). >=20 > Maybe later. Right now I think it's more trouble than it's worth. >=20 > > > I included some cc stable annotations because I think it is useful to > > > backport this to v6.18. This is to make backporting drivers to the 6.= 18 > > > LTS easier as we will not have to worry about changing imports when > > > backporting. > >=20 > > For context, will those drivers be backported upstream too? >=20 > I could imagine cases where a normal fix gets backported upstream and > benefits from this, but I mainly thought it was useful for backports > that happen downstream. >=20 > > i.e. we have sometimes backported bits to simplify further backporting > > elsewhere, which is fine and up to the stable team of course, but I am > > not sure if using Option 1 (i.e. the Cc tag) may be a bit confusing in > > the log, i.e. Option 2 or 3 offer a better chance to give a reason. >=20 > Using a different option makes sense to me. On the other hand, I think that the first patch qualifies as an actual fix. Alice