From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 867E732C95D for ; Wed, 12 Nov 2025 12:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762952126; cv=none; b=npbR4Ymfo6Vp1Mw8OyhkOrg20RucZHHASjoDchy5AvXvDh73Lq7HwONjLWwOIUUEIeNGHTh7wib0Wf39mUfwGOhjcVDouo6iCWswnVp7g0fCebMLDSIRDU1EefFyfCcVncjJ79OIxHme3feLbixsEnL48W0BtHdCqmLCMIc2H40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762952126; c=relaxed/simple; bh=BcFq00OssKkzSwCl00nvO477fZa7fF9ZX+fCk9k/p84=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=unb0SN1qfZbt1RM1liAUwNPIVi0rxaVGS6y7OS5VN5c2EdVoGeVQGa8FMlScHRoRRGnXXuJHvhSr9gQO3SlqyNvo0i+jtzvSKIPe7WPBE3mPhXhqfVyqpP0f829ouXjhmMHifVxh4qvR4d3EWf/j07I4kyf8P+0awamvib/bPr0= 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=TEnfpW0V; arc=none smtp.client-ip=209.85.128.73 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="TEnfpW0V" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4777b59119dso6866185e9.2 for ; Wed, 12 Nov 2025 04:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1762952123; x=1763556923; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Gj+EtZLPIR5LWGpVopW/lewxMd1J8lyNQVeLz8/n/RM=; b=TEnfpW0V7Tzj8plcvhV4cyNYT+L90mYo873AjML3xRTN9E6jgA+2VvrusayAmGJkTG 5NbJSGKVSXeIrvxo5UbSnBxBuk4rJZFoCPdziNSBomhXvA79J72BnWDt2MzYEyj+Uhcq WrfZOTVfBwOvOj+EdFa9uVoqDp9KAR8YSTvm61l+QWvH64narKeZ6se4JLY+5R0sXVVy uxJGi8QDIed3MWC/Uielz6aNiEpSZV2BvbZUfrHjTF+1uxfRq84bgxrhFuTUW4CmXzoJ mNK5JhUjHTk3aqQfbAHbE4o/rIaS8jZHq6Our+9WDeT6ooXVxXTW56Gfalvv9B6G3mg4 YJxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762952123; x=1763556923; h=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=Gj+EtZLPIR5LWGpVopW/lewxMd1J8lyNQVeLz8/n/RM=; b=o2+BV8akcFWfXH7QEgs7wHFRK/6anla77bq6Mi1dhlm5RcKwUN4YU4M492wf4cDUVF SAfhyPQUMSFttpsynvcvOR95z8cubJD1yUFqHOiurMSaxBFFtgwhOcQgCNeqePg+PoKH V5XHgeA5KRmb5A35gz7bSC2aTPBJCI14DT8RfcRwXw6c2t4d5BZf24cSwW6yoTmHFzMF 0r0jP+aOvf4Gyxl4I2Low+F6VkkURuZuxo2qKPkRKXowgZ5+B2s7CS9q+jFufLwqEZzZ gzkMLDqIsHRvOvSG7R6E6P8KyOlQAXDrndcs2XqNeOOLli89KqiLW6JVYJKKhm+UZaSN VRiA== X-Forwarded-Encrypted: i=1; AJvYcCVpSIxD0UXz6kE6JqPEvd+uMNW6pODhb4Yi53V4+jkd9NPQ6dHtw8qbiss85yFRn1LFM9pLt58MhBPjxLs=@vger.kernel.org X-Gm-Message-State: AOJu0YwcSQv8AsTbqHB5Q3iMSMsItSBQRO2adrbyAzIMIAywRxMMeeKt v7KVvBbQBm/qJNuzfq++2MwtGvaF9hHA4dFos82yzGJ1kIs70ATNw4xDb4MTbIHUvL1YRIvC7kX m2X1U9CLMqZUt7Xybww== X-Google-Smtp-Source: AGHT+IHVDVGyl0BDosGU/0tn/jTzVg4KaJQqt5oPgiqlVAOf23dQtEUbhxTfxX/esrh2Br2eeteSfLKiW/Ew1YA= X-Received: from wmbdx18.prod.google.com ([2002:a05:600c:63d2:b0:477:632b:1238]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:1c26:b0:477:55ce:f3bc with SMTP id 5b1f17b1804b1-477870c52bamr32419995e9.19.1762952122738; Wed, 12 Nov 2025 04:55:22 -0800 (PST) Date: Wed, 12 Nov 2025 12:55:21 +0000 In-Reply-To: <20251112-binder-bitmap-v5-3-8b9d7c7eca82@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251112-binder-bitmap-v5-0-8b9d7c7eca82@google.com> <20251112-binder-bitmap-v5-3-8b9d7c7eca82@google.com> Message-ID: Subject: Re: [PATCH v5 3/6] rust: bitmap: rename IdPool::new() to with_capacity() From: Alice Ryhl To: Greg Kroah-Hartman , Yury Norov Cc: "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Martijn Coenen , Joel Fernandes , Christian Brauner , Carlos Llamas , Suren Baghdasaryan , Burak Emir , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Wed, Nov 12, 2025 at 12:47:21PM +0000, Alice Ryhl wrote: > We want to change ::new() to take no parameters and produce a pool that > is as large as possible while also being inline because that is the > constructor that Rust Binder actually needs. > > However, to avoid complications in examples, we still need the current > constructor. So rename it to with_capacity(), which is the idiomatic > Rust name for this kind constructor. > > Reviewed-by: Burak Emir > Signed-off-by: Alice Ryhl > - let num_ids = usize::max(num_ids, BitmapVec::MAX_INLINE_LEN); > + let num_ids = usize::max(num_ids, BITS_PER_LONG); Ah ... I messed up the rebase here. Alice