From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28A4217ADF8; Wed, 16 Jul 2025 17:11:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752685861; cv=none; b=Vw4RXFUcnKJhgkPp5RJ2UTccQ71SLbtYbghV5oaKSf7nGZhajBgL+cdXapGdqhwn2WoFIqv0AYq0hLoZrxgkJZgHamhvRkzfmTv5O223sji5KMl2wF2vtQIsOdq87pVWIig9B/1oy3tNpP0ntDfgrlmmzSBrvA1in8ZFrpfrvr8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752685861; c=relaxed/simple; bh=Sxd2WnxBlqamILtjNgFWFb0gQYdI8FSiVC+BeS+gfFw=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:Cc:To: References:In-Reply-To; b=B8HA3Svtc0h4GZPh4eAqUwYMDGVuhTE/ckFSU/5isByI9LcZXGXEUjbDvu0dGm5fiwdoWY4q6kQVRq5BoKLYbLT2P/ShIVpFlXDMDAK0zuHLPT78OgfGMyM5CGcFcqEZ+ln6UCc41NucDOJPoVJPLJ8Iv2n4VhxaFh8GVZT8OGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tD5NF8ou; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tD5NF8ou" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7EFFC4CEE7; Wed, 16 Jul 2025 17:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752685860; bh=Sxd2WnxBlqamILtjNgFWFb0gQYdI8FSiVC+BeS+gfFw=; h=Date:From:Subject:Cc:To:References:In-Reply-To:From; b=tD5NF8ou7zRaAuSwrDfWxDNBfKlPqWzHksGNWpcYKesNF4I2Deh0qN3Jvgb/hFeP3 Ehti99JOjtFzqEkMCW22yBK4ibc2im8U1UaJVh0AADRcNqLLHTA6aweH5o60oh/xHo f+PIyD5HvSCAdkI/NAQJ8ctW7g0kTg0TGZF6Wne+vGH2PvHmgdGsHy27R4+WtsnJGY IA2TtCSucVP377mAnzbsA5EF4UqY3YmAWPgr0PNO0hOTI1RVwxil66UQRP3HlsDT6J TYl3cf0gIMzkHsbT/4yfJFCOMUFINVR9iC5/MN3hJJvqK2/2kaKAdVXwhLrM+h2xTD QuRJpJaHWXemA== 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 Date: Wed, 16 Jul 2025 19:10:55 +0200 Message-Id: From: "Danilo Krummrich" Subject: Re: [PATCH v13 1/3] rust: io: add resource abstraction Cc: "Alice Ryhl" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Trevor Gross" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , , , "Fiona Behrens" To: "Daniel Almeida" References: <20250711-topics-tyr-platform_iomem-v13-0-06328b514db3@collabora.com> <20250711-topics-tyr-platform_iomem-v13-1-06328b514db3@collabora.com> In-Reply-To: On Wed Jul 16, 2025 at 6:52 PM CEST, Daniel Almeida wrote: > I guess the easiest solution is to drop 'static in order to account for t= he > above, and change the signature to return Option<&CStr> instead. I think you have to do both, this... > We can also change Region to own the name, and pass name by value here: ...and this. Otherwise you'd need to ensure that the Resource you create the Region from out-lives the Region, which I think we can't. > pub fn request_region( > &self, > start: ResourceSize, > size: ResourceSize, > name: &'static CStr <------ > > > Thoughts? > > =E2=80=94 Daniel