Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1436056rdb; Sat, 23 Dec 2023 06:43:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0UA1jXE1m6DhItlGgfNPm3ri/DOoLJFMQdAeZ4Mxl3gLP19xYLCkgqnWWkWH+twG4kA5M X-Received: by 2002:a05:600c:5197:b0:40d:1648:c278 with SMTP id fa23-20020a05600c519700b0040d1648c278mr2077165wmb.120.1703342607242; Sat, 23 Dec 2023 06:43:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703342607; cv=pass; d=google.com; s=arc-20160816; b=wzubc9dOTzZYbF6wIY9OJQT7MGtxIdIJN/8s8OKk+xiLVI8zLQd3cPsZXD9Z23PkJn rZ3j/XWvyPbcXdP2XziCQlC3rGeUCgywZLnisJhoMtICWNmcBzD9bHK6bbt3iN9MfrVu WsZoGMJemQr9CkWCj3lXyXv0GGhqybfEv8B8BKOFUtyKc5V5dYs0x9iNKYXQgO6zdBzk LRW1uIvlJOn7iGeVfbxpgTT9ESMqTurvDQlS6Lkc/2IBhmvtrwI7CEt4sXBhs9zd0/tg snjOHQjT8UfDX55NBBIL31HrwvBVOu0dDIKIHTyrRFtdnld6GaTjXhKX/pedstYdZOc+ IFZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:references:in-reply-to:message-id:subject :cc:to:from:date:dkim-signature; bh=Q9kAkLeaTY7PUtIotc0GGoIMfUT0m1i/I6nMD/hn4IM=; fh=FHPD3l87Iuijmjb0CEdgbRmBt1P9lAvLyf2okkmtzg8=; b=mO5cUFuBCa84yFzFXSo7B/arBPzKnDJj881dhR4lSiXDF2sPqO36Xr8VhTp+MeuG5z 9w5Uuidv/tGEJgwEBN9AfKTkHLAN3Rh869sfEuVOhFXWkC4KHEUHT89aaJNwB6nYOSK1 tmRYaC3BfrGiTUsuzO6OAzVRPnKwj8XbcXujq8NJnW6LINvfY5SZpYqFvXUN8um7m8D3 WU5gIlOCMpCfkRz2t4Lored1wJ7WE0osEMPmhzHNrqG75XTLZXs4zyntwcJZIqE+sthy 0u7JRAMh7HVo2hdOKl05PNKqlCw7CtfoFiO9qelxbxDwbv4F0kqFTjZ1V27gIk/rZczw UJVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@garyguo.net header.s=selector1 header.b=fCbmebVm; arc=pass (i=1 spf=pass spfdomain=garyguo.net dkim=pass dkdomain=garyguo.net dmarc=pass fromdomain=garyguo.net); spf=pass (google.com: domain of linux-kernel+bounces-10466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10466-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ay12-20020a170907900c00b00a26a6334a79si2435654ejc.167.2023.12.23.06.43.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 06:43:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@garyguo.net header.s=selector1 header.b=fCbmebVm; arc=pass (i=1 spf=pass spfdomain=garyguo.net dkim=pass dkdomain=garyguo.net dmarc=pass fromdomain=garyguo.net); spf=pass (google.com: domain of linux-kernel+bounces-10466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10466-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id CFC811F2275C for ; Sat, 23 Dec 2023 14:43:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13EE312E63; Sat, 23 Dec 2023 14:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=garyguo.net header.i=@garyguo.net header.b="fCbmebVm" X-Original-To: linux-kernel@vger.kernel.org Received: from GBR01-CWX-obe.outbound.protection.outlook.com (mail-cwxgbr01on2109.outbound.protection.outlook.com [40.107.121.109]) (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 CEF4C12E52; Sat, 23 Dec 2023 14:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=garyguo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=garyguo.net ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lMQ6cX8+dtDOxLY4KjLnVSp6BENd0770j1CR6a0I6BlS/INiEcky03v2R8a24EM6nbSqdQbNcA1XEIg2RL4E/H9W385CzUUQ40fiNqAwDfp+yM4AEniZvXT8+r79yRR3Fevxfpj5rYVs4L1UfLtUFJ4olgbCEOCwHcJ+ukpYBWM2AvkENlg/UWFkDx5zFUfg+cseUeHZtUC5V79Fnmkd8eGYc7MvQVNJPJL9QoLX2voIgSzVl5z8VBtwb1nauRx82E15kptkmgrG6iCIvh5QALixHm+8eFkayY5G2MyEEvl2+AwOavJ/hF0nQYs0JCfXw17Kd3J4qKRBVI+qTBKuaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q9kAkLeaTY7PUtIotc0GGoIMfUT0m1i/I6nMD/hn4IM=; b=RAuFgNmqbqZe60EnvHOONloFBtfTD63EeuPNzPLKMxeATBlCDr1P8UuAQrIBmX8FhuyXGWB/9juQAC4Of3paNaOiYH42n/z4Leg9PrWNoxoJvdROmxLbqTp/3uTf8FHhauB0pLgNFRoOFN7CPDt1yUHMq3VNvUNLY8V2GULsvRv+2uxF7yCV0iIcgUxtr9mU+WeYtqdGsv5tmjEgT1PFCm8PGDZpvC7e7krW/Si2Z83oQx0KJMIy3or7qgso31U8fALWQuro7wUzER2wa8lxOpORRT3R6HKx6GltjS+bXwAVWkNyMn+7BYTU3j6OatGSS8sp9CMAXvtzvqFqVFYBoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=garyguo.net; dmarc=pass action=none header.from=garyguo.net; dkim=pass header.d=garyguo.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garyguo.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q9kAkLeaTY7PUtIotc0GGoIMfUT0m1i/I6nMD/hn4IM=; b=fCbmebVmTYZ1sw+QVTiKrsc5lUQa8/5Nvn+P50UKitHkQUi+wK6ezVniDQT/AFOiGkzH6MXOuRNJ0gn/5Ad7RDgcC28L0wsX/EauRHQcDvjq9Z94VZZRILCKHGYjKUAhD97dRnz+4c2BcVxAjt27Lxy+8XgYrg8olJu4sRE0J7k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=garyguo.net; Received: from LO2P265MB5183.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:253::10) by LO0P265MB5747.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:264::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.24; Sat, 23 Dec 2023 14:43:11 +0000 Received: from LO2P265MB5183.GBRP265.PROD.OUTLOOK.COM ([fe80::ec07:aa7e:ffbc:ba47]) by LO2P265MB5183.GBRP265.PROD.OUTLOOK.COM ([fe80::ec07:aa7e:ffbc:ba47%4]) with mapi id 15.20.7113.023; Sat, 23 Dec 2023 14:43:11 +0000 Date: Sat, 23 Dec 2023 14:43:09 +0000 From: Gary Guo To: Benno Lossin Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , =?UTF-8?B?QmrDtnJu?= Roy Baron , Andreas Hindborg , Alice Ryhl , Martin Rodriguez Reboredo , Tejun Heo , Wedson Almeida Filho , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] rust: workqueue: add `#[pin_data]` to `Work` Message-ID: <20231223144309.3bc42ecf.gary@garyguo.net> In-Reply-To: <20231213220447.3613500-3-benno.lossin@proton.me> References: <20231213220447.3613500-1-benno.lossin@proton.me> <20231213220447.3613500-3-benno.lossin@proton.me> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0006.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::20) To LO2P265MB5183.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:253::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LO2P265MB5183:EE_|LO0P265MB5747:EE_ X-MS-Office365-Filtering-Correlation-Id: bde98005-a658-4677-7c27-08dc03c57c99 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MvAhM+YgNkE0L00JYcvQgaaI42KSnTaGeo/R12JRDALe8IqfLpMQAHoOeXXWPem8YMJDVgIUgTe9QGJya1YlNmv/7NpQKK5kF/58s9K9nyNfBRLvS2ELtCfhIBUzYuvWpDNAlSGFmoSkWpkApDqx87MxWn13FtlL8YFi+glA3CX7JmLIwv3w3/d0ggD3vph8Pf1NiN3PjkqV5NnqNDwpy8UoMSPlgnITefnJb42amDyAXpVuGBqIffBPwGjkdFudr460U7R79hmdFNBDdIfA0cq3gRJYabhf2CarKdgjtPhndXIyXBatkGndiubYeiLXGtzeTxMNOKvL9L05HEnSQBm2DeN6TMhTlqliwDACJGdnt1Lz0ryNlCjwnwooB1zzU21u+pzL1x7BKcCVX5um0YvkBYh4Qx4Y8i369gaJTqwW3/LGP2xx43C7kIpK+dTJ0Xc7VC/X0kPWxfPW8dorPKtpgIsucz/vexI45VLjq3XkljZ6zE8ps7EJ8SjtKnVugLX59NMJb+jRSLGQ4mtym1XMljj23ROEBrH7lRasqpOhQrTk7mVacdo6QqCjWIbpn+nXZqz3VvN1c6szmAH0KEGxBFSPbqxB7EJbbTiwLAU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LO2P265MB5183.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(39830400003)(396003)(376002)(366004)(230922051799003)(186009)(451199024)(64100799003)(1800799012)(1076003)(2616005)(6506007)(6512007)(36756003)(86362001)(38100700002)(5660300002)(7416002)(8936002)(8676002)(4326008)(83380400001)(66476007)(54906003)(66946007)(6916009)(66556008)(6486002)(41300700001)(4744005)(2906002)(316002)(478600001)(81973001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IyyXCvhxFUEWRFUJjn3xdRlaWNJUD/zGeQtXOb0eCtTgGpM1pbGPsnHmwhmy?= =?us-ascii?Q?has++O2KGlDCVB31q7LnRSCK0ZzfMHsfl/PTf5p1QMU5vW2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AtYOp3R/ZitAfmXoT8WY1b+Xc7iTSAnZ0mUvCHNpt?= =?us-ascii?Q?eij93OWe48gT5De3FYPZlVcm3i3e9GyeCesz+UFe/hQF2y9SIdggC+qFZDa8?= =?us-ascii?Q?voSmmImIHsPQghJMumv9dD0IcYDY3mga/iHub0fg/OgrDVtU4mSdon2DZu3p?= =?us-ascii?Q?CmCsxDJ+Vy4DVFVX+buHTu/RD2CJTY9IMBq1Uj7nZxWP20Nl0LR60qahhLJn?= =?us-ascii?Q?4UFl0RaBMlt8jUGGf1PHFjIRXsetbQXT3pXsj6ofdaeM69E0aHdon4jsXhBw?= =?us-ascii?Q?PPWPfymXa6eKN4feuiZbqJPu2BKfbP1IVFZtYONW5t8/BZzw33+/BqM46U16?= =?us-ascii?Q?4d88xbp+B0iNl35T5hplyP60KVOEVcdjWF63rItCN/apVtMSB2Swbr2i8qMs?= =?us-ascii?Q?jQUkLCyLNWG/yTRCiSk2kLJELZ7TO9z+rqDOAMa720ADpybncgfM8IeZmqQd?= =?us-ascii?Q?QK+qarBtflLjbS4PtZIDubZXllpvG5v2EfjsLVV+wH+fD/QAQzxD0VRxoURv?= =?us-ascii?Q?A7qFrbKt6zXfnpy2tVpux+hHuCyfARxW/Gzx0FRS3/jXTqZ2DG+5kC+X+Ib3?= =?us-ascii?Q?c13bhRH9bgeE7ErGVYo9gLP2MTnG0goi4L3+SrUES3SYDKUjYgBUNk1Pw70C?= =?us-ascii?Q?pARBXTDlJ8r0haPPW2mfbkw5LtWAaMMZgX/U8ieFEj87?= X-OriginatorOrg: garyguo.net X-MS-Exchange-CrossTenant-Network-Message-Id: bde98005-a658-4677-7c27-08dc03c57c99 X-MS-Exchange-CrossTenant-AuthSource: LO2P265MB5183.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2023 14:43:11.4673 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bbc898ad-b10f-4e10-8552-d9377b823d45 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kto3/JJPiGSINXLZ/Y1cZcfoSl56+v7ucjD9+zuY+lJ5F3w5u0s/AC1Iy5Daj57oJ/5DA92KOTZDVNsp0s//ZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB5747 On Wed, 13 Dec 2023 22:09:04 +0000 Benno Lossin wrote: > The previous two patches made it possible to add `#[pin_data]` on > structs with default generic parameter values. > This patch makes `Work` use `#[pin_data]` and removes an invocation of > `pin_init_from_closure`. This function is intended as a low level manual > escape hatch, so it is better to rely on the safe `pin_init!` macro. > > Signed-off-by: Benno Lossin Reviewed-by: Gary Guo > --- > v1 -> v2: > - improve commit message wording > - change `:` to `<-` in `pin_init!` invocation > > rust/kernel/workqueue.rs | 33 ++++++++++++++++++--------------- > 1 file changed, 18 insertions(+), 15 deletions(-)