Re: [PATCH] linux/kernel.h: add container_from()

From: Linus Torvalds
Date: Thu Aug 27 2020 - 14:04:49 EST


On Wed, Aug 26, 2020 at 6:36 PM Allen Pais <allen.lkml@xxxxxxxxx> 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.

Linus