From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Greg KH <gregkh@linuxfoundation.org>,
Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH][next] container_of: add container_first() macro
Date: Sat, 21 Sep 2024 09:10:50 +0200 [thread overview]
Message-ID: <426c0507-be04-4b87-8595-0a6a740d4dfe@embeddedor.com> (raw)
In-Reply-To: <2024092149-stove-babied-e7cc@gregkh>
On 21/09/24 07:52, Greg KH wrote:
> 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.
Okay, I'll change that.
--
Gustavo
>
>> 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
>
prev parent reply other threads:[~2024-09-21 7:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 12:50 Gustavo A. R. Silva
2024-09-21 5:45 ` Dan Carpenter
2024-09-21 5:52 ` Greg KH
2024-09-21 7:10 ` Gustavo A. R. Silva [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=426c0507-be04-4b87-8595-0a6a740d4dfe@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®