From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (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 10022402B9E for ; Tue, 25 Aug 2026 12:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787659814; cv=none; b=A80ZKQ3k+jaOrQ5geY4jE1iLh4gOwsATT/dhv6X5qFzLVLVA1/g5+lTOXAvAGazGHhES+pTQBYU+VVMmI7kGgc7rJIZjOfkd6ljy+I6LCygjIFDmXIDaoITzTQHFHssTtZtRGQBCkA4zXqFiUiySRJSqDUHCpd0B12T3iK/O32c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787659814; c=relaxed/simple; bh=OyyGXw2l0NbBrsd2rbD74GlPQuHdpYapoj+0rfRIRxM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=muSwXBOK/BWzz/lt/ispLYN1yBrSUYvVs0f1/TKwEBlzDJ7pN5MK9wNuQ8sJImyGn3kVuxTKiy1GPlgEXpjW038UIkwG8g3MWHRQ/NEeNzh3EAClf8TRCiChvY0+CS3yS+ZEMr4H3hoJtIhqzthlFK7F99bcWWmvu/9mz/F6tzY= 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=IRKAr+y4; arc=none smtp.client-ip=209.85.221.69 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="IRKAr+y4" Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-482a5e9400eso3282609f8f.2 for ; Tue, 25 Aug 2026 05:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1787659808; x=1788264608; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Rq043gvhHpHDZLtYzyheTlOt41eSYp4wtv15MTCDIrc=; b=IRKAr+y4+MDAPwNTqfy4NMQxw+4HRVBD6UEtkdUzdhCvlTP1avYxrWz+2wUNJC0CBE jxTs7MIt16JxynfnwArwAMhingfy3HjL/Ml32HB3G+IN5gNQ6aFYI12ctrXTfdqVWuXp +WTCpVD2bdAvDpRQr/TTqqzhlr7JwAsio7ftO3aKEOv3TOZKtrMG8TF35R5xfxOla5u8 OS08KBuKXTP6SMo5HMkkyuzHO1Qu7W2+iuTgXk/ajBAtw+xVtxjC7RGpvK494q3TeTfs XnS2g+2X7am8vsvFbVRfduke48PI6HAPBTR/PQCEIETw66X0P7B91wMOIvhsQIJqZR3b 1UJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787659808; x=1788264608; h=content-type: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:content-type; bh=Rq043gvhHpHDZLtYzyheTlOt41eSYp4wtv15MTCDIrc=; b=icgj9LkqjkxREyqbCzUsbJSwEeJ9TDduRp2cKKmNyIPUC80i2unpSk470PQpfgoXKQ exN4oUhyJwKBf8jM9S0rUFCN0Si5iupwUWsFWdIAnmEy01dQoMalIRS7eYWO7ZxDJBg8 2qB5EWDcZmS3UlV9VmiBAH41rPZWldalqRIt5sTbCkA8BpbIpNkDv3xXEPaS8TVgdnXb mA65oZh7jtdiE+a48oUU0fzLoYzRKv+u7mXp4dtYW6+Brxg2JaBFH/sOVfDIFXSXsatv UxWU6eae5xG/qMi4n95D1orqeqPZZai4dZP8Iti3R7eslAb+IfxZEBqENcRlHek40yha kuxQ== X-Forwarded-Encrypted: i=1; AHgh+Rr1SKcOfqubLViwLpgD6ZUUmu8AC5HBXQ5DvGbtko3ny839QqZZXjwRokadsKy0mKSF5qp6p8vLn3EbOzc=@vger.kernel.org X-Gm-Message-State: AFuF++lOHgKyCNkAfcmbaJC+iyE1y2nDqJi2K510uT/+LRpAtnMD2ZDs hWMJQN4qAWsjq3ojrYib7PjEWFM5tCUwPjmOzGecwrWf5KTXrSuHzi8lpGCX18qPcru4QyvhL7V JY4bIC93Jxlx8PS2n5g== X-Received: from wmbjz11.prod.google.com ([2002:a05:600c:580b:b0:499:af1a:8d42]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3544:b0:493:f140:c3fb with SMTP id 5b1f17b1804b1-499b8301874mr380176875e9.7.1787659808082; Tue, 25 Aug 2026 05:10:08 -0700 (PDT) Date: Tue, 25 Aug 2026 12:10:06 +0000 In-Reply-To: <20260817-chid-v7-6-a5872e64d8f4@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260817-chid-v7-0-a5872e64d8f4@nvidia.com> <20260817-chid-v7-6-a5872e64d8f4@nvidia.com> Message-ID: Subject: Re: [PATCH v7 06/10] rust: id_pool: take a NonZero capacity in with_capacity From: Alice Ryhl To: Eliot Courtney Cc: Burak Emir , Yury Norov , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , "Onur =?utf-8?B?w5Z6a2Fu?=" , David Airlie , Simona Vetter , Greg Kroah-Hartman , John Hubbard , Alistair Popple , Timur Tabi , Zhi Wang , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="utf-8" On Mon, Aug 17, 2026 at 04:04:20PM +0900, Eliot Courtney wrote: > There is no good reason to allocate an IdPool with zero capacity. > Reflect this in IdPool::with_capacity. > > Signed-off-by: Eliot Courtney Why do this? Zero capacity is not an invalid state, so please don't impose the nz! macro upon users for no reason. Alice