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: [-next] EDAC: Fix debugfs_simple_attr.cocci warnings
Date: Fri, 5 Oct 2018 22:38:31 +0200 [thread overview]
Message-ID: <20181005203831.GF10285@zn.tnic> (raw)
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.
next 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 20:38 Borislav Petkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-05 10:52 [-next] EDAC: Fix debugfs_simple_attr.cocci warnings YueHaibing
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