mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
powerpc/eeh: 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@huawei.com> Acked-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
e59f5bd759
commit
8c6c942d33
1 changed files with 10 additions and 10 deletions
|
@ -1808,10 +1808,10 @@ static int eeh_freeze_dbgfs_get(void *data, u64 *val)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_SIMPLE_ATTRIBUTE(eeh_enable_dbgfs_ops, eeh_enable_dbgfs_get,
|
DEFINE_DEBUGFS_ATTRIBUTE(eeh_enable_dbgfs_ops, eeh_enable_dbgfs_get,
|
||||||
eeh_enable_dbgfs_set, "0x%llx\n");
|
eeh_enable_dbgfs_set, "0x%llx\n");
|
||||||
DEFINE_SIMPLE_ATTRIBUTE(eeh_freeze_dbgfs_ops, eeh_freeze_dbgfs_get,
|
DEFINE_DEBUGFS_ATTRIBUTE(eeh_freeze_dbgfs_ops, eeh_freeze_dbgfs_get,
|
||||||
eeh_freeze_dbgfs_set, "0x%llx\n");
|
eeh_freeze_dbgfs_set, "0x%llx\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int __init eeh_init_proc(void)
|
static int __init eeh_init_proc(void)
|
||||||
|
@ -1819,12 +1819,12 @@ static int __init eeh_init_proc(void)
|
||||||
if (machine_is(pseries) || machine_is(powernv)) {
|
if (machine_is(pseries) || machine_is(powernv)) {
|
||||||
proc_create_single("powerpc/eeh", 0, NULL, proc_eeh_show);
|
proc_create_single("powerpc/eeh", 0, NULL, proc_eeh_show);
|
||||||
#ifdef CONFIG_DEBUG_FS
|
#ifdef CONFIG_DEBUG_FS
|
||||||
debugfs_create_file("eeh_enable", 0600,
|
debugfs_create_file_unsafe("eeh_enable", 0600,
|
||||||
powerpc_debugfs_root, NULL,
|
powerpc_debugfs_root, NULL,
|
||||||
&eeh_enable_dbgfs_ops);
|
&eeh_enable_dbgfs_ops);
|
||||||
debugfs_create_file("eeh_max_freezes", 0600,
|
debugfs_create_file_unsafe("eeh_max_freezes", 0600,
|
||||||
powerpc_debugfs_root, NULL,
|
powerpc_debugfs_root, NULL,
|
||||||
&eeh_freeze_dbgfs_ops);
|
&eeh_freeze_dbgfs_ops);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue