public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Marco Felsch" <m.felsch@pengutronix.de>,
	"Ondrej Jirman" <megous@megous.com>,
	"Mylène Josserand" <mylene.josserand@bootlin.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: edt-ft5x06: Use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
Date: Wed, 6 May 2020 17:22:18 +0200	[thread overview]
Message-ID: <20200506152218.GA3447721@kroah.com> (raw)
In-Reply-To: <20200506150623.3841-1-raishwar@visteon.com>

On Wed, May 06, 2020 at 08:36:22PM +0530, Aishwarya Ramakrishnan wrote:
> From: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
> 
> On Tue, May 5, 2020 at 11:49 PM Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Tue, May 05, 2020 at 09:03:24PM +0530, Aishwarya Ramakrishnan wrote:
> >> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
> >> operation rather than DEFINE_SIMPLE_ATTRIBUTE.
> 
> > No it is not, why do you think so?
> 
> This change is suggested by Coccinelle software.
> Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Not a good thing, I do not know why that was added :(

> > The two defines do different things, that is why we have 2 different
> > defines.  You can not just replace one with the other without
> > understanding why one was used and not the other one.
> 
> > Did you test this change to verify that everything still works
> > properly?  Why is it needed to be changed at all?
> 
> DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
> imposes some significant overhead as compared to
> DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

What kind of overhead?  Is it required?

> But I missed to use debugfs_create_file_unsafe() function in the patch.

Yeah, don't use the unsafe stuff unless you know what is happening here
please.

greg k-h

      reply	other threads:[~2020-05-06 15:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 15:33 [PATCH] Input: edt-ft5x06: Use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops Aishwarya Ramakrishnan
2020-05-05 18:19 ` Greg Kroah-Hartman
2020-05-06 15:06 ` Aishwarya Ramakrishnan
2020-05-06 15:22   ` Greg KH [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=20200506152218.GA3447721@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aishwaryarj100@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=megous@megous.com \
    --cc=mylene.josserand@bootlin.com \
    --cc=p.zabel@pengutronix.de \
    /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