Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp790324rdh; Sun, 24 Sep 2023 11:57:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHp+U1Gjl02lD4XLMX74h4xmE9HcJ32roXAV80UwrK9uxhX7QnpQBkbZi9SkwV1C8PkRsSx X-Received: by 2002:a17:902:c085:b0:1c3:2532:ac6a with SMTP id j5-20020a170902c08500b001c32532ac6amr4717109pld.33.1695581829632; Sun, 24 Sep 2023 11:57:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695581829; cv=none; d=google.com; s=arc-20160816; b=H5R3AE6z5LxtXp6TGs3V88M2BOPui61SLpBr7PSwhB8Mn8tJ0+CCZaZUX5g6dvpgaM iIC5LA5Et7qPtSyRYbreVisB1z1cQBzSZjCF5I1wELZZ6qPy+WtmvlBMTooA475sPEun 4dOr5ZZ1Qf6n2l0fchxxgeO2yeVLp9GbOOG0AG5bbIpAUS4THdPzjudmpqfrT2MiaEB0 RTFbyil1M5xnUHnXv33KWMknl7VWVvbgoDcQG9C5OwQ2kEh9oWa5hnhyhScBQe1cBVOZ ee1Jd2f61+NQNLyzhMvEBmXT7wSr2/eWGKFeNvzxZHf2kf4N5CX7ceIX25fy+JevK3Z3 cLNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :date:dkim-signature; bh=KHCxcKh13d7DDl1+tVT1f9MF1ReKtzY/5wTFWHlKAFQ=; fh=ILXzPT3nbZXhvwVwwPDMnlxaRbCVxHwkAsH+01sTnAQ=; b=zMUmFx6NFXXu2H48DYcUg+cwXRrmSOe0IU5QjptbXE7ROKeBf6tTolOhM0KMuelvOl f4LNFSG0qeFhi+BhHOZnqbX1cz4WxqrnW/4kpqhvjAeSoS1is0kBW2tfHZzBhjkXGpYY bLOcP+HTvyQNbWI7W8zHN0cJg3K01UgzFSD8WCjX7htzCz+KiLYbX93XyK1e21ZM0cyL rclWldWofPuN00QufuQJ2uFVTDQjGaA0Cuzpxi+y8fXyCl0cn68Jm+NWBsGBCz5P2b6N ETqty2cqB6lKf/tnvTwD4nvsR1pAQgvE8lzVX6qCSHgyEqAx6O5Wt1ssQGdxSnWfmzMx YQoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=FSbven0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t8-20020a170902e84800b001b8c824e826si2900698plg.533.2023.09.24.11.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 11:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=FSbven0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id ECC9F8168217; Sun, 24 Sep 2023 05:00:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbjIXL7x (ORCPT + 99 others); Sun, 24 Sep 2023 07:59:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjIXL7w (ORCPT ); Sun, 24 Sep 2023 07:59:52 -0400 Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC77D10B; Sun, 24 Sep 2023 04:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1695556783; x=1695815983; bh=KHCxcKh13d7DDl1+tVT1f9MF1ReKtzY/5wTFWHlKAFQ=; 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=FSbven0Uht21ygeMaRKuxI0kpOkUB/KafGZe1MX9jacry9N8FRq3GfVxT05LaFDoB XAqmTWYlCGLsX92frMBBlUDHO8Iie3yV3Gq19wgrUrAljTWOxNYluG8Mel769tIr6t J2s+cgJZhpt7tAoI/FJDgxX8wyL3Et04Hm4/HTDtwhfTGG0WS/lUJBzColl25kYJie kohVFleVUgsF90dlZyTdFvseH0Lxv3Apcbab2v5SLOia2lB/gzhE9V3enZmMtGjfYE UdnNEIzZD76OKnzgmgaUxzZpYpmFak+GXeyRs1zMQ6CJttkQSBIaXZQAmDLRlOETEx ccjaCdz2vba+w== Date: Sun, 24 Sep 2023 11:59:34 +0000 To: Wedson Almeida Filho , rust-for-linux@vger.kernel.org From: Benno Lossin Cc: Miguel Ojeda , Alex Gaynor , Boqun Feng , 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 v2 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef` Message-ID: In-Reply-To: <20230923144938.219517-3-wedsonaf@gmail.com> References: <20230923144938.219517-1-wedsonaf@gmail.com> <20230923144938.219517-3-wedsonaf@gmail.com> Feedback-ID: 71780778:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 24 Sep 2023 05:00:03 -0700 (PDT) On 23.09.23 16:49, Wedson Almeida Filho wrote: > From: Wedson Almeida Filho >=20 > With GATs, we don't need a separate type to represent a borrowed object > with a refcount, we can just use Rust's regular shared borrowing. In > this case, we use `&WithRef` instead of `ArcBorrow<'_, T>`. >=20 > Co-developed-by: Boqun Feng > Signed-off-by: Boqun Feng > Signed-off-by: Wedson Almeida Filho > --- > rust/kernel/sync.rs | 2 +- > rust/kernel/sync/arc.rs | 134 ++++++++++++---------------------------- > 2 files changed, 39 insertions(+), 97 deletions(-) Reviewed-by: Benno Lossin