[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-28156d7678431312b463361b23a218a1b5645ba5@git.kernel.org>
Date: Fri, 19 Apr 2019 10:28:52 -0700
From: tip-bot for YueHaibing <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tony.luck@...el.com, mingo@...nel.org,
torvalds@...ux-foundation.org, tglx@...utronix.de, hpa@...or.com,
yazen.ghannam@....com, peterz@...radead.org,
vishal.l.verma@...el.com, yuehaibing@...wei.com, bp@...en8.de,
linux-kernel@...r.kernel.org
Subject: [tip:ras/core] x86/mce: Fix debugfs_simple_attr.cocci warnings
Commit-ID: 28156d7678431312b463361b23a218a1b5645ba5
Gitweb: https://git.kernel.org/tip/28156d7678431312b463361b23a218a1b5645ba5
Author: YueHaibing <yuehaibing@...wei.com>
AuthorDate: Fri, 28 Dec 2018 07:24:13 +0000
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 19 Apr 2019 19:25:08 +0200
x86/mce: Fix debugfs_simple_attr.cocci warnings
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
DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Vishal Verma <vishal.l.verma@...el.com>
Cc: Yazen Ghannam <yazen.ghannam@....com>
Cc: kernel-janitors@...r.kernel.org
Link: http://lkml.kernel.org/r/1545981853-70877-1-git-send-email-yuehaibing@huawei.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/cpu/mce/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 58925e7ccb27..3e081428117c 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -2429,8 +2429,8 @@ static int fake_panic_set(void *data, u64 val)
return 0;
}
-DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get,
- fake_panic_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fake_panic_fops, fake_panic_get, fake_panic_set,
+ "%llu\n");
static int __init mcheck_debugfs_init(void)
{
@@ -2439,8 +2439,8 @@ static int __init mcheck_debugfs_init(void)
dmce = mce_get_debugfs_dir();
if (!dmce)
return -ENOMEM;
- ffake_panic = debugfs_create_file("fake_panic", 0444, dmce, NULL,
- &fake_panic_fops);
+ ffake_panic = debugfs_create_file_unsafe("fake_panic", 0444, dmce,
+ NULL, &fake_panic_fops);
if (!ffake_panic)
return -ENOMEM;
Powered by blists - more mailing lists