[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1598553133.4237.8.camel@HansenPartnership.com>
Date: Thu, 27 Aug 2020 11:32:13 -0700
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Allen Pais <allen.lkml@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH] linux/kernel.h: add container_from()
On Thu, 2020-08-27 at 11:04 -0700, Linus Torvalds wrote:
> On Wed, Aug 26, 2020 at 6:36 PM Allen Pais <allen.lkml@...il.com>
> wrote:
> >
> > Introduce container_from() as a generic helper instead of
> > sub-systems defining a private from_
>
> NAK.
>
> This seems completely broken.
>
> The documentation comment doesn't even match the macro, and claims
> that "container" is a type.
>
> Which it isn't. That's what container_of()" already takes.
>
> And if the argument is that a broken commit introduced a broken
> macro,
> then that's not a great argument. Yes, we have that broken
> "from_tasklet()" macro, but it's not even *USED* anywhere.
>
> So instead of adding a broken new concept that adds absolutely no
> value, let's just remove the broken macro that isn't even used.
The argument is more over the tasklet rework adding from_tasklet that
was effectively completely generic.
https://lore.kernel.org/dri-devel/20200817091617.28119-1-allen.cryptic@gmail.com/
The tasklet rework people don't want to use container_of, which was our
first suggestion, because it produces lines which are "too long". So
container_from is a compromise that takes the actual structure pointer
as a second argument instead of the structure type, thus being
completely generic and suitable for line length reduction in the
tasklet rework code.
James
Powered by blists - more mailing lists