From: Borislav Petkov <bp@alien8.de>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Tony Luck <tony.luck@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] EDAC: Fix debugfs_simple_attr.cocci warnings
Date: Fri, 05 Oct 2018 20:38:31 +0000 [thread overview]
Message-ID: <20181005203831.GF10285@zn.tnic> (raw)
In-Reply-To: <1538736760-101310-1-git-send-email-yuehaibing@huawei.com>
On Fri, Oct 05, 2018 at 10:52:40AM +0000, YueHaibing wrote:
> Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
> for debugfs files.
>
> Semantic patch information:
> Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
> imposes some significant overhead as compared to
What significant overhead? This commit message needs to explain what is
wrong with the use of DEFINE_DEBUGFS_ATTRIBUTE first.
> DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
Reading the comment over this function:
* It is your responsibility to protect your struct file_operation
* methods against file removals by means of debugfs_use_file_start()
* and debugfs_use_file_finish(). ->open() is still protected by
* debugfs though.
doesn't sound like something I'd want to additionally pay attention to.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
prev parent reply other threads:[~2018-10-05 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 10:52 [PATCH -next] EDAC: Fix debugfs_simple_attr.cocci warnings YueHaibing
2018-10-05 20:38 ` Borislav Petkov [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=20181005203831.GF10285@zn.tnic \
--to=bp@alien8.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tony.luck@intel.com \
--cc=yuehaibing@huawei.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