Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3346841lqp; Tue, 26 Mar 2024 06:58:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGk7TsCVkhKT6kFssoKRQn1ywg6a+TrxIt0ihM3djR8dXGGlwOX+CMsOH2O5JiptOKdGb4C7W3VzuqlNqw0ghwvvDPdGXXJSh15/cWrw== X-Google-Smtp-Source: AGHT+IFZ9KE142Uj4jpwY+vw5RgmfEwHjazk71gLhq/jYFV2s3uGvNheO5uFdIl9BIb7760zNLqg X-Received: by 2002:a05:6214:268f:b0:696:73f5:19c6 with SMTP id gm15-20020a056214268f00b0069673f519c6mr12171721qvb.13.1711461533782; Tue, 26 Mar 2024 06:58:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711461533; cv=pass; d=google.com; s=arc-20160816; b=UG3B6E2PEup+acaikc2VmSrqcU5IZ09PeqTC1v+R/JirdVFHQsbdu6q4g/4tXSoGwG /DsbmT3OolwuhWRO+d2xmJsllQPjw0M8vwfSLhgIa1vvncXEhUQymZN5/GacSPxGhF7G z1hvd1kj74Po8eSCW2Lg78En4d1M3BSaWCecv8zxx1XdP0grDr8dBjKEt9ETrceegmBe JsOtzP/rc7yHiRMc/tg+tF8U7PLRaiv7VK86uR+7efU1pmvRCDvDmesNDrhvxdmzM1kw SS+4BGjFf1S5g1i3d8pEDykaLFpvMI2TRfk0fIZM1XWtFT4cPu/7LVUO0tNkkbNuYd2R iU+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=qtEBAIBIYK65CQa7Za5xsfAYMGv1McPLumPTs6claeg=; fh=cwB6VzYjS+w6GNrKjz5MEPLomrzvbyVAlFzftnCdqnE=; b=PUmPmh+TC08w7/6QaD53VTVmgclPo0tcFkPgm/TWvbG7hTxNuf1BswnI3DZ1MZYZoC 3x2o0gjhbmxJsjBA2eAC/x0SVQT1USpc7ownQvSLjt7EgGza/uNEcDjCv9qfJmyDuEto jj9uc/LtOpBJQicMDV5KFd3DyqAM0LpTbh2H8OrdPeOToXQFpMjT3SPrTB020zRa1ifv aumv81gQ9GnP+Hz3qTvGVsuJ9Xouk8d9Z/aHsCJOk4VmFXkwIGGGLuyLRFCDsuyAyZRf 4DkQ85EXSJrB+MmZczpjId2SjPtV5T8ncSNJbQ6Ez4teKOFCwSvyfAydBECg4wp4gZeG ybXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=ghr8XxPr; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-119104-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id kd11-20020a056214400b00b006961d18107bsi9773946qvb.81.2024.03.26.06.58.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 06:58:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119104-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=ghr8XxPr; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-119104-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F9271C3F9B2 for ; Tue, 26 Mar 2024 13:58:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD9F776039; Tue, 26 Mar 2024 13:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="ghr8XxPr" Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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 5CCCA7440B for ; Tue, 26 Mar 2024 13:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711461522; cv=none; b=nwMTv42Hu+D6Mb5nW6QWDOUAu5BP0/sDSKfPeY/uuTW8lVEXChXbvdkUh36op9HilvbXLLlia9G9FeOIxjtyYBuYY2nTdNthx5P3lNg6EoDOxrOcm0wSErhxyAuSArrk3Y53SJzRlS1hQ7CPvv42qPtXNnwPo1d084+f316tjdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711461522; c=relaxed/simple; bh=zKa4/45e9odHjxrpuei7T8kQZfCmORh48encO6ZwDXA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=o4wxmpB0OvVxk20LqK4xyuWcwd+rNG3NH32wyp9lCY2SJmNixrXM820CbOxhTSdFUXwobJ3ObCl3OEbabpoM9cuLk5H0217M8UeYZEivRY3V3XOx9o0avABCqbBK5p3eYtWU6e39Awib8HRCxJQ9jCk/D7be7vl6RIqKrVGDt10= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=ghr8XxPr; arc=none smtp.client-ip=185.70.43.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1711461518; x=1711720718; bh=qtEBAIBIYK65CQa7Za5xsfAYMGv1McPLumPTs6claeg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ghr8XxPrelWouWgUrziU85wQJAplgbqyXXWDYwZytG4/i4HzAQxjYzYr9ghQ0E6Wr ovoUPMACwUzwkEpYtcV2bNHWqOuYJ53npXv4O0CjbA3hOk4jnPfcrI2eb+ej2kOqpB amsvKjQaEnFlRKXfatWy1db8T21Ba2Y5mXe5l60zeF1jU2MARIKjFbZ5PwIqCCu4ay MKhSoJHLPxwQZVHZ8NoiDoRHGbHnPy1rTz+naUDn0JExRIkIco9dGDjyMXXqWLWIOG wJeeeptdHy6SBfbha2hLSSaf/n/YVsoXpbJ7fjEaGlnHw4q72TN46cokaIkx5e5eat +aMATUl4Yrs4g== Date: Tue, 26 Mar 2024 13:58:33 +0000 To: Wedson Almeida Filho From: Benno Lossin Cc: Boqun Feng , rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, Wedson Almeida Filho Subject: Re: [PATCH 07/10] rust: alloc: update `VecExt` to take allocation flags Message-ID: In-Reply-To: References: <20240325195418.166013-1-wedsonaf@gmail.com> <20240325195418.166013-8-wedsonaf@gmail.com> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 25.03.24 20:54, Wedson Almeida Filho wrote: > From: Wedson Almeida Filho >=20 > We also rename the methods by removing the `try_` prefix since the names > are available due to our usage of the `no_global_oom_handling` config > when building the `alloc` crate. >=20 > Signed-off-by: Wedson Almeida Filho > --- > rust/kernel/alloc/vecext.rs | 106 ++++++++++++++++++++++++++++------- > rust/kernel/lib.rs | 1 - > rust/kernel/str.rs | 6 +- > rust/kernel/types.rs | 4 +- > samples/rust/rust_minimal.rs | 6 +- > 5 files changed, 95 insertions(+), 28 deletions(-) With Boqun's change: Reviewed-by: Benno Lossin One thing that we might consider in the future would be to create our own `Extend` trait to allow extending a Vec with any iterator. --=20 Cheers, Benno