Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3492670rwb; Fri, 16 Dec 2022 16:10:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXvFpwDvZcqB7aYvxABr5lBKfZRpEDMeYTAECN0FjdFTfHR9U272P3Hv/5SrGiTbfq6TAarU X-Received: by 2002:a62:7b82:0:b0:57d:9b8e:92a7 with SMTP id w124-20020a627b82000000b0057d9b8e92a7mr10990812pfc.7.1671235820414; Fri, 16 Dec 2022 16:10:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671235820; cv=none; d=google.com; s=arc-20160816; b=zGHjxLBUQRgKiwY+E+BEA6suLpPCbFNZjqYsLceFMzvSB+atuYB3f8nWzj9PU3O9Gr LDrzkxwGuAP5sOw24Zgm7YhKBp71b9WN9lrf+mHsvZziBVYECRRfsBgzo4DeDJI00eqO H7N3pLp+dgbiRaDZ2ooMVQzuh7IAj+j5VZ1lmVZd4G/AxHnHoZji349HQdPn3zMy6KNW YJZhORvq1z+NymDFmLfbIxSvB+kRTjbtfYw+l1pmcrsyTrO+e5eq84O0ijY/iTQgNm+t 5ervCYuEA28eTHfUttsCj1bKQ1zK5UgA+rHA3DqZJKtOBL2VoJGuzil7tzdp5ifvHa8W 2PGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=z0jxoLmhjzdQFU4Rcca6h1zELOoOj2Hhrq5sWSEt7V8=; b=qg1zgDNmFvIlkOmf7JpPycg/yImor83U7jJ1eS75BR6SLkDORj7vV7m6VO3ZE6T9aj CAwZQ45cfRk/W13P2p6BWZIGfUOdad6aaCQbiXaXOtVnQ+CU5nMu6G+WScifl7MPia34 RGrUmZp8ysmLzUrugxqQshWvMJohdWeQzGoOucr80YlYI/E8kF2H4lyR6XxgO5PEi167 8CW41r75Cj9FDObbrZ5UX5vdD3ZuTepiYWX5dlhLzXofjEcUwbC+XwhnC58zIykAFscs lDj+i0qnsyYMxihYCa88KcEXvOUgqZpQMD8Fwm47QxGH5MhdrmII/jbElxg0J1ABt/0P tc8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HKVw5J3n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020aa79401000000b00576dee77c98si3809732pfo.299.2022.12.16.16.10.10; Fri, 16 Dec 2022 16:10:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HKVw5J3n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbiLPX5g (ORCPT + 70 others); Fri, 16 Dec 2022 18:57:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbiLPX5e (ORCPT ); Fri, 16 Dec 2022 18:57:34 -0500 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7999555A9A; Fri, 16 Dec 2022 15:57:33 -0800 (PST) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-3cbdd6c00adso54072007b3.11; Fri, 16 Dec 2022 15:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=z0jxoLmhjzdQFU4Rcca6h1zELOoOj2Hhrq5sWSEt7V8=; b=HKVw5J3noI9XmTp4k5G5m6+ylCn+yW93A8XQkAdG6J0nZjK32B+jT+rwcdWmz1pT5V UJwEz+vfCU+EunGlHsDGZekb7UkXj6gVB0LX6AB+lfgWsLwCwmhEA1MqUOGTpZxs87ix N9w//MYY/k3CER6eOJaRf1C+TR+HSZfOm4UwvXN12W2ka5cex6o29Tuk6neAyxkBuNeA VpZA+HQvEXyUZzNMRYxz0ERRm0ThKupJphUHgMhZMWW2mq5ob/6tmc+aErEt9z1VrI7G OuM4mZrax5w+/tRQWaFFjaYToTDXhvXv0It8FToCuaYw0Ot3FhLjA/mpLiwC/rQm/Tfp PgXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z0jxoLmhjzdQFU4Rcca6h1zELOoOj2Hhrq5sWSEt7V8=; b=0iES4Db0XONHT+IFPNBHgWst67tWDu4ZrNfnNAoNYYoFj/p0sz53SDpITlM86X2+TM vE3RvgxzFPHddOR9xsJVgpmcnD3YDhMLFWglBRoWFNtyrDfZOJfiQWloo4QPo+Tyzyr9 CfCvUpUZfniv45SmCGbtmS5nPRLnD6dYpvYg0qpZMIHgF9P3k13nffXvxNKd3N18JrTM jMzR9IlwYWMlkvEacm0x8cKEiHOKY50rMP6g/ZLvILnWK5gN6oOESMZzhnKCjy9Z77T0 Z1jsg5S+Sn848IDvyDprufVPz5cE/CWPthIds2MpDw6oWd81Sc826EBCzZ25j6yRKIHG xB3Q== X-Gm-Message-State: ANoB5pntWuFNh1nCpd0jaqLk2ejDDKuDUQsIdsTQmeCb0bZxcvAyc8cW hHr5nDChKK6cWzqTVi27wAu2WtavpjJe+xTUxMczLYEffflbpw== X-Received: by 2002:a0d:eb15:0:b0:3b8:7fc6:c06b with SMTP id u21-20020a0deb15000000b003b87fc6c06bmr3567855ywe.129.1671235052681; Fri, 16 Dec 2022 15:57:32 -0800 (PST) MIME-Version: 1.0 References: <20221216174927.1008629-1-wei.liu@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Sat, 17 Dec 2022 00:57:21 +0100 Message-ID: Subject: Re: [PATCH] rust: kernel: drop repetition in offset_of macro To: Wei Liu Cc: Boqun Feng , Wedson Almeida Filho , rust-for-linux@vger.kernel.org, Linux Kernel List , Miguel Ojeda , Alex Gaynor , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= Content-Type: text/plain; charset="UTF-8" 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_NONE,SPF_HELO_NONE,SPF_PASS 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 On Sat, Dec 17, 2022 at 12:30 AM Wei Liu wrote: > > What will be even better is someone please contribute such a macro to > libcore so that I don't have to replicate the code snippet everywhere. > :-) It is happening! :-) See https://github.com/rust-lang/rfcs/pull/3308, currently at the end of the FCP ("final comment period"), i.e. the RFC is likely getting accepted soon. We track it at https://github.com/Rust-for-Linux/linux/issues/514 (one of the sub-lists in issue #2). Cheers, Miguel