Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp654900rdb; Thu, 30 Nov 2023 14:51:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzD4IX7+CR+wNnvLGZIVqBK9Irpxv/+uEjqA4uJtluiSYE4hjD2JxqLKxZfhx3gpPEsf7D X-Received: by 2002:a05:6a00:21c7:b0:68a:3ba3:e249 with SMTP id t7-20020a056a0021c700b0068a3ba3e249mr28581145pfj.16.1701384677750; Thu, 30 Nov 2023 14:51:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701384677; cv=none; d=google.com; s=arc-20160816; b=ESJSEFMMO2ujlb3HA4BZb4ilFHWwh1NevEluA+U54/ESklqFMwTXEB/x9ktSluz3ly uIa2pGiexVCy6DaEmgjmN5TVGF1SE0uM70XDluxDeR90+OHro5S3eRxwF4ypk7Lh3HBb oSp7z3QtJm1ahEuyAcKj1lHHyoj9p0ajZVsBj5xrP91raAzprnTQ/dLlvmpATi37Re4a 0fyei86dqe6NqUMCftF35K5mz2x6p7b0bcn2Q0trMEwgDwzl0V4WSZe8CIWfdhCthoEV MHMubl5gFx8DCLgPifdsQwwtBLq/YGlq/dmW4ybMQAvqt5pVYlD1D/ts5ycY1SlrsTPd qJHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=+9WwWZklN0+vDMUHEvugiN9GLGkxGRM9Mi/9Ul82cU0=; fh=e2QygIhcr0lSTmAb4JoIYI1zNXz6sYVFWYZGjkaNTJw=; b=c0B0KOZvpfxY5XwUjh4yeUQ/W0v7sjoh7ORmtjJ1iSOW7jfz0jCSUH/LXkZNuALtrD Gv1SePay6onT9ZFwXG8LYVG9KZgOuy0TZgrU4RNFG0oJMLetr2YW6+lF7kkkDKsSk9+e yCHqf+oQUGpL6V8BoIBuUS7kn6XWePzFacCuiXAdmsv7wOHxElmewErLXraIsQQR0Ung VeOdjUcTj53U2ZxMKi4oyd51eK9SpEQw4wj9EZAvtebJvWvHVEJWIJ2E5JcjcM/Mmm0z ba17pW+VoVgp8mfAwHTzaBIVco76KPoLT4K8Zo1KowvMZq+18pWRe8MMYsKVIblwlH0C tvCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G9xF+sDw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a1-20020a056a001d0100b006cdd1aed274si2146572pfx.349.2023.11.30.14.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:51:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G9xF+sDw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CEC3A801B423; Thu, 30 Nov 2023 14:51:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377191AbjK3Wuy (ORCPT + 99 others); Thu, 30 Nov 2023 17:50:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235194AbjK3Wuw (ORCPT ); Thu, 30 Nov 2023 17:50:52 -0500 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D0C91; Thu, 30 Nov 2023 14:50:59 -0800 (PST) Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3b8903f7192so897810b6e.0; Thu, 30 Nov 2023 14:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701384658; x=1701989458; 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=+9WwWZklN0+vDMUHEvugiN9GLGkxGRM9Mi/9Ul82cU0=; b=G9xF+sDw8cfPlKP2o/y36pPN8MexE9lZ1ImbVHHxM+fo24+69BPT5QSTSyuMBCbY25 JasR5cjJYm8X/z7rMoER1yhdU6VHTL93LdKDDb5ga2SHfJ0XqX9tnOs0DWYXYuBhAp5N KL/p+fm/zxejDn9m1NsOKASyNSTJmnl6n9atQDb09qxI0Qfck0swtqpiHNwO0iPxZYwJ k/MqVvAW6fRWmOKvpR9YEXlaNldOaDi+DsnBprkJXSwFE90t0SbJYit7cvw6nRdGqdWq WKxLMveK2Lr2WeTAARSfGKJ9pOWpL1FzE9HHntN+AiMaTSchpNGhjH8yK9449omknZ78 ar1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701384658; x=1701989458; 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=+9WwWZklN0+vDMUHEvugiN9GLGkxGRM9Mi/9Ul82cU0=; b=Fbmm8aW5bMWPw0QTMmIq+LGPYosyqW7oF7hW0qY+DfPKr1PSAHcwKtEkAu3foEu4Q9 maNMmwAABD/Ls0zQE019CjAaLWeVCOMnOYjo9yjpG69YAnYjDKVDTXyaiGQ48h68g/Nm 88Bgie0my+ysmXjSQpM+ikfEA7OKQWHm7DOx0J82x8wkozdvT7jzU585gI6868vE7ZjB hpKRzlfhZtim3IUrKjxrM4HkT3UY3YadtenvCGWlAss10cYjrebRPLxbs1xpy4HCuZz8 oNjBF1+ZSikcNTS3eO9vRLsIsbZcFMuAnIPsuIW0JLWPJHiTpcVwTlxo0iRK7NdtsVBZ 3s/g== X-Gm-Message-State: AOJu0Yx8pKlJgpl+TFMyzQSoCD6mlzYyQvM/SkLq5NHkxaOs6rx+rgHt cZ+VdfOtVUaF02zdvnm9jfk= X-Received: by 2002:a05:6871:e499:b0:1fa:d6e7:afe0 with SMTP id pz25-20020a056871e49900b001fad6e7afe0mr2341151oac.56.1701384658387; Thu, 30 Nov 2023 14:50:58 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id o16-20020ac841d0000000b00423829b6d91sm904566qtm.8.2023.11.30.14.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:50:58 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 6448C27C0054; Thu, 30 Nov 2023 17:50:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 30 Nov 2023 17:50:57 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeikedgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeehudfgudffffetuedtvdehueevledvhfelleeivedtgeeuhfegueeviedu ffeivdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Nov 2023 17:50:56 -0500 (EST) Date: Thu, 30 Nov 2023 14:50:07 -0800 From: Boqun Feng To: Alice Ryhl Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Peter Zijlstra , Alexander Viro , Christian Brauner , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Dan Williams , Kees Cook , Matthew Wilcox , Thomas Gleixner , Daniel Xu , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 7/7] rust: file: add abstraction for `poll_table` Message-ID: References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-alice-file-v1-7-f81afe8c7261@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129-alice-file-v1-7-f81afe8c7261@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 14:51:06 -0800 (PST) On Wed, Nov 29, 2023 at 01:12:51PM +0000, Alice Ryhl wrote: [...] > +// Make the `CondVar` methods callable on `PollCondVar`. > +impl Deref for PollCondVar { > + type Target = CondVar; > + > + fn deref(&self) -> &CondVar { > + &self.inner > + } > +} I generally think we should avoid using Deref for "subclass pattern" due to the potential confusion for the code readers (of the deref() usage). Would it be possible we start with `impl AsRef`? Thanks! Regards, Boqun