lkml.org 
[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rust: kernel: drop repetition in offset_of macro
On Fri, Dec 16, 2022 at 06:26:57PM +0000, Wedson Almeida Filho wrote:
> On Fri, 16 Dec 2022 at 17:49, Wei Liu <wei.liu@kernel.org> wrote:
> >
> > It doesn't make sense to allow multiple fields to be specified in
> > offset_of.
>
> Why do you say it doesn't make sense?
>
> Here's what I had in mind:
> ```
> struct Y {
> z: u32
> }
> struct X {
> y: Y
> }
> offset_of!(X, y.z)
> ```
>
> Which is something very plausible.

You're right. I didn't consider that use case. This patch can be
ignored.

Thanks,
Wei.

\
 
 \ /
  Last update: 2022-12-17 00:11    [W:0.063 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site