From: John Hubbard <jhubbard@nvidia.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>, <gregkh@linuxfoundation.org>,
<surenb@google.com>, <joaodias@google.com>, <willy@infradead.org>,
<digetx@gmail.com>
Subject: Re: [PATCH v6] mm: cma: support sysfs
Date: Wed, 24 Mar 2021 00:10:18 -0700 [thread overview]
Message-ID: <e95534be-6cda-ca82-0ee0-a0a626e871ba@nvidia.com> (raw)
In-Reply-To: <YFri1Qn1YorOPvsM@google.com>
On 3/23/21 11:57 PM, Minchan Kim wrote:
...
>> , how about approximately this:
>>
>> struct cma_kobject_wrapper {
>> struct cma *parent;
>> struct kobject kobj;
>> };
>>
>> struct cma {
>> ...
>> struct cma_kobject_wrapper *cma_kobj_wrapper;
>> };
>>
>>
>> ...thus allowing readers of cma_sysfs.c to read that file more easily.
>
> I agree cma->kobj->kobj is awkward but personally, I don't like the
> naming: cma_kobject_wrapper parent pointer. cma_kobject is alredy
> wrapper so it sounds me redundant and it's not a parent in same
> hierarchy.
>
> Since the kobj->kobj is just one line in the code(I don't imagine
> it could grow up in cma_sysfs in future), I don't think it would
> be a problem. If we really want to make it more clear, maybe?
>
> cma->cma_kobj->kobj
>
> It would be consistent with other variables in cma_sysfs_init.
>
OK, that's at least better than it was.
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2021-03-24 7:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 1:05 Minchan Kim
2021-03-24 2:34 ` John Hubbard
2021-03-24 3:27 ` Minchan Kim
2021-03-24 4:47 ` John Hubbard
2021-03-24 5:44 ` Minchan Kim
2021-03-24 6:26 ` John Hubbard
2021-03-24 6:57 ` Minchan Kim
2021-03-24 7:10 ` John Hubbard [this message]
2021-03-24 12:37 ` Dmitry Osipenko
2021-03-24 15:18 ` Minchan Kim
2021-03-24 12:33 ` Dmitry Osipenko
2021-03-24 15:12 ` Minchan Kim
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=e95534be-6cda-ca82-0ee0-a0a626e871ba@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=digetx@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joaodias@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=surenb@google.com \
--cc=willy@infradead.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