From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E6BBC37DE9F; Mon, 25 May 2026 12:05:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779710741; cv=none; b=o752p/tUL20kO8fYyQRRO92DEgBq83nVupD494x8smz+BQoUxlqImGnvAEiaD/62yXenvtZtmAJNfVqlQ0GcCCh2e8oPAyswPMKA2dSw1jdQLe4Mx9MTpnoyf5IX9GB6fqmjyYg+Z4guDNtQoFxvb9FnyFnHxWvc9UA7llFiRF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779710741; c=relaxed/simple; bh=QQ+RZJGh8DWH5kFovbz1NpBQqzIxDynlHNya2gERhGk=; h=Mime-Version:Content-Type:Date:Message-Id:To:From:Subject:Cc: References:In-Reply-To; b=lTmsj2nj7Hospt+YwxJLOIK55enzvfznpkD5Tbe2uNJFFW4PuEHk+nyWPq5qyNFLkDqZQV5GsraEUk/odvT7hHQ6A715x5BOn1a3bZcx2/8Sb1K1Fl2UTvkPFo/VzQ8ZSBm03RnNmpUad7zgFF1ylUruShQSZt/Jc9ud2ouj+4U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H46V06tl; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H46V06tl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E6301F000E9; Mon, 25 May 2026 12:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779710740; bh=8Nk9IRpfjFpPpcX3RiYgN+W6i/7+f2+AyfDzqFLXzt0=; h=Date:To:From:Subject:Cc:References:In-Reply-To; b=H46V06tlanS3w6FJpaYnHysMTaAdRs09nAhIdviag/qtWU5rAZ+SebBBlXCd+k1ki IIjWlnwI7wRGB2HeaEyW+yvEeHzY3gfgcaqdcRkQkgLsYc2vEAsWl/Jo5O/qk9E5Up LHPptJzP0wih50NohTPP+q8EeLNjy544KS6V2dT715q06s0c0An/YJOk7ONQDnsvoH 2klWQ5GJ0DC4oExrsjEUszN/1/Qd+cH7difkpY3G5N4vs1HHWruW0hzXBZmyk6wvYN wJVKSb7pm5tbUn6fne/9LsJYQo8swAcJ8IT3Oox0CTOiGcgia2SDQmrCoAm2w2yofX QsbiWVqMSpgnw== Precedence: bulk X-Mailing-List: rust-for-linux@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: Mon, 25 May 2026 14:05:32 +0200 Message-Id: To: "Gary Guo" From: "Danilo Krummrich" Subject: Re: [PATCH v4 17/27] rust: pci: make Bar lifetime-parameterized Cc: "Eliot Courtney" , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , "dri-devel" References: <20260521233501.1191842-1-dakr@kernel.org> <20260521233501.1191842-18-dakr@kernel.org> In-Reply-To: On Mon May 25, 2026 at 1:40 PM CEST, Gary Guo wrote: > On Mon May 25, 2026 at 5:37 AM BST, Eliot Courtney wrote: >> On Fri May 22, 2026 at 8:34 AM JST, Danilo Krummrich wrote: >>> +impl<'a, const SIZE: usize> Bar<'a, SIZE> { >>> + pub(super) fn new(pdev: &'a Device, num: u32, name:= &CStr) -> Result { >> >> I think Sashiko's comment w.r.t. &CStrs in this patch looks accurate >> and they should be 'static or at least 'a ish. > > It needs to be `'static` to be leak-safe. Yes, it needs to be 'static as it is stored directly in struct resource. Th= is has been a bug without this patch already; I will insert a small fix for th= is, so it can be picked by stable separately. Thanks, Danilo