Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp912475rdb; Fri, 9 Feb 2024 05:10:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUU+4GFrUTaXQpktzITfKnTPMhrZBnmJRXJEOi0n4FRTzHptKaQjhMQZNImfI+cN7d4uVHCGcoHoOTwe7X42WfuPJQXaTRA24QLv7nckA== X-Google-Smtp-Source: AGHT+IH6A4507gH7Xmcv8InZDGegtmEmDGPOnOcAKqxpkYLbvpAaiTQw8YYPgKGpiUW4Z0hxpLQ/ X-Received: by 2002:a9d:6aca:0:b0:6e2:c10d:65c8 with SMTP id m10-20020a9d6aca000000b006e2c10d65c8mr1459403otq.9.1707484237730; Fri, 09 Feb 2024 05:10:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707484237; cv=pass; d=google.com; s=arc-20160816; b=gn4J+0tZ3P8yIWBbG+ah2wWEA343qOEyLiDJBUviQBw67Jkn45CKvrkTl+j7paVEiy gKq6XZhU5ABmA7/WMbPlpxNjrrpNdU0WPfntOhw+7gxsIWLkkQHlyx8ub8pqeBqJJys8 GWx7agbtLaR8+UXdJsD2gwGlRVH6cNZ36giN9fJ0nel/Pts8OlK+nTkPhb73UtPV1vic zOLKdXbULe9DT9ABzMoYJP3ZPVBimqy9IWe5oJcPYA9rH9fiWzFWVd9rcyJlyKLVV5EJ esqeAYiZ2qudUnK5VweDdahwiHuOy5VRO+OSzS/INS9E4fRuAIZofxBBlpFgkrDuZG8n 0Ltw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=RxLgmJtRrWkGZg+HZMG1tfMX6Q9WWD8CMQ/AGzP0BpU=; fh=1uJnqXpt151QSsjKprk65Ab+qGLllJm16TMoPKFLNbg=; b=WI3f+JqL0tRTc8er6wijkf8jx6xdoTx6ZahWOPGFrh+arW2ncPkiglYzreWTZ677WC 8HTaYRjf/0EGFoqKZBtgMxLJqiTbONy8XHjoTqjwUm/9DWWRJEnmAksVzMTO8RPaXlKO 38eocjby9MBG0d3PGOfrGSralyRdzwxm7/+tyjuB9iERy5swSMAIloQugkw+7bytT+Ys aDWHenNqBcel7ne2Ni1dbIW8n+w2z+IVFZFoK67kF0+FzdQQdYDJnjR+oJBiw4taIFjK A3biAuv3F2eQvDE9w/2ayX9ucPTh6fJoGfB2Z9Dxc5og5KZa1uTuPrlgsGcWaI6WR6JW Q4AA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=TdYFzyx1; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-59344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCU977hGg4jFEPiFhbFq146zs3ckzjMgjzcjzppI1xMu2Mgq6W5KE9PklsFhyg8rXnxoDu2KaTSpPU++VvUZqbDhwJZ4kFE+BSXcFPqz7A== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z15-20020ac87f8f000000b0042c36a96268si1811906qtj.473.2024.02.09.05.10.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 05:10:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59344-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=@google.com header.s=20230601 header.b=TdYFzyx1; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-59344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 4D54D1C2247D for ; Fri, 9 Feb 2024 13:10:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E04DC37700; Fri, 9 Feb 2024 13:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="TdYFzyx1" Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B551B20311 for ; Fri, 9 Feb 2024 13:10:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707484216; cv=none; b=Ztqp31BaNTR3tAkYXQPEWVVsI+z6817XpuoskI0HG1b1G38gXtlCEeB/4VH4UXdxy1ZbipyVfuA1DPEZ0THaAo1q4r5zmLdKKV8tZ4T42bYEpbii2ugS8goxOT/BrmBxc+S/vCFAUirQqU13BHmjTdviKRbhOhBCEm6+2L2nk/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707484216; c=relaxed/simple; bh=RxLgmJtRrWkGZg+HZMG1tfMX6Q9WWD8CMQ/AGzP0BpU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=V+mXuwNVqs2p3iEHi5OiJAeLCZpDO1DbAOTWpWZDYhyYSTGBx5udFDEBhmpWZCQBKbr3pbMjMbR50QXtj/mmHXLzOeyFxcIxUaGzSvUvht7O1jH+UjupGphnD0V6/v+LQ4SYJnc0a1LHjT4aa7RQINP6OKg6WW1byy2S6APZUdw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=TdYFzyx1; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7810827e54eso54465985a.2 for ; Fri, 09 Feb 2024 05:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707484213; x=1708089013; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RxLgmJtRrWkGZg+HZMG1tfMX6Q9WWD8CMQ/AGzP0BpU=; b=TdYFzyx1zEzzE+4Gi/DLu6IWeSD2n1OwiyhzX+aGP57zQPZu2fg1tlRmEK0oVwSKZU f8ITh2wGap67kmVbjqm8xTc/G+zhseyNiUH8BXGonV0Vg2HGLt+tuokMa5sodsVlhS/Y G/vZDt1NFSNM6eIuS1vgOFlh9s2DseN0Y8f3vrFraiUluFemf8vdb8tGW1nYU7S/VEdK vrPr0lSMwgQeaJ9Y9fnRIgUeVrNi7CJ9rXvTJhUuMWxD6Ko2RQgCsWZS/rbXnI7E1n9L pagwsHqGxFFf0XKdzSvWH7I284TVwtPSxhrPAiPdy2xRLCswAZEzJL4IuWPh/z8eV9He ysew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707484213; x=1708089013; h=content-transfer-encoding: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=RxLgmJtRrWkGZg+HZMG1tfMX6Q9WWD8CMQ/AGzP0BpU=; b=rQYW4A8t//MAYaMvJ2+QteW1omeFoSw9C4Qk1HDCBYNmaHl1TwM+Afl+Zy9rTjqZrH +yMDV+2/FcXdB0GZny5BlpQWhz7Ktnb8Ab8C0wVKcwncpAI0baJY2htnMgYXb8DkqppA +hNHssU76/aZS3cxt9GfD0oP8+0ZEbLKD3mpeUQNBw0c8ubs/zq5HltKP8L4+akI2cdF 7EiG5zhqD3zqs8Jhyv3owtfylx8pKzMInn4dPdNrnQeVsyi4cWDVz1tTBCqNbH+ipcs3 kfEFr9orzR+jwfzSjlFjv1nCGpfbCHpWvpLuL3X+Sb6IYIFzYtzSeZc6DgU5RmI9Ce07 gwew== X-Forwarded-Encrypted: i=1; AJvYcCUAxaCLzY6731g+kIFof6d4z/BjTNKuUvu29fauSiMSc1dmlvK8JXpN59xifBlWXn6lfEMBa5AZtQn3PWNQh1j0wVOJ5SImmo9rYO2o X-Gm-Message-State: AOJu0Yz6OcbhSqXhgA79vEfDR7mT7AispUSDhY0MjJVp7Pxu48caiQU9 bdzme9Ps9gZWXEMFJN9VCfaAi4J/B1qcNovSmS4XK3I0bf3BLRP4A1Xc8R3GEb4RvMxMIUNNab8 rjXOoz+E41DPV2TzWJ1GaHUuJQygi5JwWyDpW X-Received: by 2002:a0c:e247:0:b0:68c:cc45:7980 with SMTP id x7-20020a0ce247000000b0068ccc457980mr1485127qvl.26.1707484213563; Fri, 09 Feb 2024 05:10:13 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240205-b4-rbtree-v1-0-995e3eee38c0@google.com> <20240205-b4-rbtree-v1-1-995e3eee38c0@google.com> In-Reply-To: <20240205-b4-rbtree-v1-1-995e3eee38c0@google.com> From: Alice Ryhl Date: Fri, 9 Feb 2024 14:10:02 +0100 Message-ID: Subject: Re: [PATCH 1/6] rust: add `container_of!` macro To: mattgilbride@google.com Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Greg Kroah-Hartman , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Christian Brauner , Rob Landley , Davidlohr Bueso , Michel Lespinasse , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 5, 2024 at 4:50=E2=80=AFPM wrote: > > From: Wedson Almeida Filho > > This macro is used to obtain a pointer to an entire struct > when given a pointer to a field in that struct. > > Signed-off-by: Wedson Almeida Filho > Signed-off-by: Matt Gilbride Reviewed-by: Alice Ryhl Tested-by: Alice Ryhl