[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024092149-stove-babied-e7cc@gregkh>
Date: Sat, 21 Sep 2024 07:52:42 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] container_of: add container_first() macro
On Sat, Sep 21, 2024 at 08:45:28AM +0300, Dan Carpenter wrote:
> On Fri, Sep 20, 2024 at 02:50:02PM +0200, Gustavo A. R. Silva wrote:
> > This is like container_of() but it has an assert to ensure that it's
> > using the first struct member.
> >
>
> I just remembered that Greg wanted this based on container_of_const().
Yes, that would be best.
> Really container_of_const() should be renamed to container_of() and
> container_of() should be renamed to container_of_helper() and we
> would add a #define container_of_const container_of for the transition.
I agree, but I wonder if it's safe to just do that already and how many
build warnings would happen. Last I checked it was a lot.
thanks,
greg k-h
Powered by blists - more mailing lists