From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (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 459251AA3C3; Tue, 30 Jul 2024 22:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722377195; cv=none; b=Dm8eejaFqDT6fuTO1vRtZvcKixmGxzlCZh6V2bJHIo3EOTDohV64aLT9jgs07eVzZVpgghQX9UNxNsvooYRSnYuEWgzCF+p/ycuIcAjYjx6dBXF3Bkq7rYiRNqywNGXz1QjXzGIh7+fDxuyFuwtmhb4LVQKJ7RH9VdsSVmBWLQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722377195; c=relaxed/simple; bh=Ds1uhl8VGl2N6fEfVBcRSBcgyUphnUxrxOG5x8i0Pho=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IAYO56fo1voPuCUJ860Zi0fi3kqgYoiGVUwKfALES8qwk6X0jNvrTBy4yuyntPBEuinEcUe3mOFYiqqPUGWBP4Qk7a63DA21nc6HkfffIqEq2cuUm17kVGfxQ+QkPb1FLvLqv3uzEVTZIhERe9vpQgaBaucGDF/r93Vwci9LWls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RX+tsubb; arc=none smtp.client-ip=209.85.160.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RX+tsubb" Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-44febbc323fso27876531cf.1; Tue, 30 Jul 2024 15:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722377193; x=1722981993; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=qVw2KpthxU8jlBQahqrzZUWPHZ3m06u8jaNvfPAwBLQ=; b=RX+tsubbgQp43UZG4KgF2pHpBlKxIS+6uW3YKmzCdWLLGXRh73qEXjabElorl93yPv 6eZfSlfDoSoCajgnPFI3YeAKWU22cW9t3//6SXn9UBe+Ga7wv3F4lBk940e2PLzXQIdI eE2mudb5u1oKsDXn2wwlhCy/S71/Mti78f9A8MOAXhLVpPmvhb88Dk0XoKIKYZjFRFYN 99An9arz9WxuekUOSUV/SprS+HhGhKsIDt+3YIoHlVpTkJCPEwjGT9OQmSblgJGIbS9A mtYVT2hYtneNsCf7PmdpLYCgVGeqIiRFWc0EQFcuLkz/HJQ3F8DJGJMpFg3vfyIsA5rv ch+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722377193; x=1722981993; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qVw2KpthxU8jlBQahqrzZUWPHZ3m06u8jaNvfPAwBLQ=; b=GYzu49EV5s2kkPFvjDehoPqXmazDhlnu5mvimM1rTmH51xcojjwvCOfL4ylxdFaLMs NtLofwpGNwVbFULEsaqDToQXgsUA6FoTVymSq0KSI+wjykk7cE5oI5igsSYk5M57a6AI 5W6aeiVPiyuJlFzXqWrZbrRjdVKrG1pqA9XrQRswBwZxU/wBiBQRQ0UziQtysDMEuHTc wW9G3uoGeUaDYlhLXDhb35UFbxOyAWVXIjsvvNmh5SvA6sMt/+eQ1/IGQO7ZAJB6YnHd xzaVMiHED8ZPwkmGHJkyV+BvVOmtIAffTd8bRsZg4jr4JP7A4dTpHYdOznDiKpghB86u vE9g== X-Forwarded-Encrypted: i=1; AJvYcCXlTAJZ246Lc79yoqTqB2FaE15Ag/OBSnWe53SzOq31u3Qt2aNOhU1jKJf/U7VHHmcDW2f1vqxRomGeT0KjO3B04M/oulClKU0lYz5AaLptXRc5ww85E7y8QtR0Td5FE2J+xJZ90qdD0wEwqdY= X-Gm-Message-State: AOJu0YzM5g4LXNbSFSeF4m0Tz9+T22p/WVVY8E686nJcqLq/8hNRy/EF aMbvHEiD3TNdiRHMffIvFEGq5432GRiDRFLxvuokZ+/oKay0AgVK X-Google-Smtp-Source: AGHT+IFP7bi44J66LsWfM9BWyyHJ2qYNDfwex6DI/P3ll0PWuSsCxmW67ptcpD+177qq1iYQwBk4wg== X-Received: by 2002:ac8:5953:0:b0:447:f5d2:7c5f with SMTP id d75a77b69052e-45004f4e50emr161021771cf.53.1722377193023; Tue, 30 Jul 2024 15:06:33 -0700 (PDT) Received: from fauth1-smtp.messagingengine.com (fauth1-smtp.messagingengine.com. [103.168.172.200]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-44fe814edc4sm54245991cf.28.2024.07.30.15.06.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 15:06:32 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfauth.nyi.internal (Postfix) with ESMTP id 1E9521200070; Tue, 30 Jul 2024 17:57:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Jul 2024 17:57:31 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeehgddtgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveeiudff iedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsg hoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieeg qddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigi hmvgdrnhgrmhgvpdhnsggprhgtphhtthhopedt X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jul 2024 17:57:30 -0400 (EDT) Date: Tue, 30 Jul 2024 14:56:48 -0700 From: Boqun Feng To: Matt Gilbride Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Christian Brauner , Rob Landley , Davidlohr Bueso , Michel Lespinasse , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 2/6] rust: rbtree: add red-black tree implementation backed by the C version Message-ID: References: <20240727-b4-rbtree-v8-0-951600ada434@google.com> <20240727-b4-rbtree-v8-2-951600ada434@google.com> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240727-b4-rbtree-v8-2-951600ada434@google.com> On Sat, Jul 27, 2024 at 08:30:47PM +0000, Matt Gilbride wrote: [...] > diff --git a/rust/helpers.c b/rust/helpers.c > index 4c8b7b92a4f4..608b38c0b3e8 100644 > --- a/rust/helpers.c > +++ b/rust/helpers.c > @@ -157,6 +157,13 @@ void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func, > } > EXPORT_SYMBOL_GPL(rust_helper_init_work_with_key); > > +void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent, > + struct rb_node **rb_link) > +{ > + rb_link_node(node, parent, rb_link); > +} > +EXPORT_SYMBOL_GPL(rust_helper_rb_link_node); > + Just FYI, this will trigger a conflict because of: 53ed0af49642 ("rust: add a rust helper for krealloc()") Regards, Boqun > /* > * `bindgen` binds the C `size_t` type as the Rust `usize` type, so we can > * use it in contexts where Rust expects a `usize` like slice (array) indices. > diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs > index 9a943d99c71a..dc2678803637 100644 [...]