mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	gladkov.alexey@gmail.com, LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v2] fs: proc: store PDE()->data into inode->i_private
Date: Tue, 23 Nov 2021 19:10:48 -0800	[thread overview]
Message-ID: <20211123191048.56b25c5d2459f78631a61bfb@linux-foundation.org> (raw)
In-Reply-To: <CAMZfGtV7pNaVNtzPCmXnGgeojPzyVxXSeawnp5znJxkjFweAgA@mail.gmail.com>

On Mon, 22 Nov 2021 12:13:33 +0800 Muchun Song <songmuchun@bytedance.com> wrote:

> On Sat, Nov 20, 2021 at 6:56 AM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Thu, 18 Nov 2021 23:23:39 -0800 Christoph Hellwig <hch@infradead.org> wrote:
> >
> > > On Fri, Nov 19, 2021 at 12:11:04PM +0800, Muchun Song wrote:
> > > > +
> > > > +/*
> > > > + * Obtain the private data passed by user through proc_create_data() or
> > > > + * related.
> > > > + */
> > > > +static inline void *pde_data(const struct inode *inode)
> > > > +{
> > > > +   return inode->i_private;
> > > > +}
> > > > +
> > > > +#define PDE_DATA(i)        pde_data(i)
> > >
> > > What is the point of pde_data?
> >
> > It's a regular old C function, hence should be in lower case.
> >
> > I assume the upper case thing is a holdover from when it was
> > implemented as a macro.
> >
> > >  If we really think changing to lower
> > > case is worth it (I don't think so, using upper case for getting at
> > > private data is a common idiom in file systems),
> >
> > It is?  How odd.
> >
> > I find the upper-case thing to be actively misleading.  It's mildly
> > surprising to discover that it's actually a plain old C function.
> >
> > > we can just do that
> > > scripted in one go.
> >
> > Yes, I'd like to see a followup patch which converts the current
> > PDE_DATA() callsites.
> >
> 
> You mean replace all PDE_DATA with pde_data in another patch?

That is indeed what I meant.

      reply	other threads:[~2021-11-24  3:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  4:11 Muchun Song
2021-11-19  7:23 ` Christoph Hellwig
2021-11-19 22:56   ` Andrew Morton
2021-11-22  4:13     ` Muchun Song
2021-11-24  3:10       ` Andrew Morton [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=20211123191048.56b25c5d2459f78631a61bfb@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=gladkov.alexey@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songmuchun@bytedance.com \
    /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®