[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1804280943300.2700@hadrien>
Date: Sat, 28 Apr 2018 09:44:48 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Sujeev Dias <sdias@...eaurora.org>
cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, Tony Truong <truong@...eaurora.org>,
kbuild-all@...org
Subject: [PATCH] mhi_bus: core: fix debugfs_simple_attr.cocci warnings
From: Fengguang Wu <fengguang.wu@...el.com>
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
for debugfs files.
Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
imposes some significant overhead as compared to
DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
Fixes: ec8245f7a36f ("mhi_bus: core: Add support for MHI host interface")
CC: Sujeev Dias <sdias@...eaurora.org>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---
url:
https://github.com/0day-ci/linux/commits/Sujeev-Dias/mhi_bus-core-Add-support-for-MHI-host-interface/20180428-065959
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
mhi_init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/bus/mhi/core/mhi_init.c
+++ b/drivers/bus/mhi/core/mhi_init.c
@@ -233,8 +233,8 @@ static const struct file_operations debu
.read = seq_read,
};
-DEFINE_SIMPLE_ATTRIBUTE(debugfs_trigger_reset_fops, NULL,
- mhi_debugfs_trigger_reset, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(debugfs_trigger_reset_fops, NULL,
+ mhi_debugfs_trigger_reset, "%llu\n");
void mhi_init_debugfs(struct mhi_controller *mhi_cntrl)
{
@@ -257,8 +257,8 @@ void mhi_init_debugfs(struct mhi_control
debugfs_create_file("events", 0444, dentry, mhi_cntrl,
&debugfs_ev_ops);
debugfs_create_file("chan", 0444, dentry, mhi_cntrl, &debugfs_chan_ops);
- debugfs_create_file("reset", 0444, dentry, mhi_cntrl,
- &debugfs_trigger_reset_fops);
+ debugfs_create_file_unsafe("reset", 0444, dentry, mhi_cntrl,
+ &debugfs_trigger_reset_fops);
mhi_cntrl->dentry = dentry;
}
Powered by blists - more mailing lists