Commit 7cd4774f authored by YueHaibing's avatar YueHaibing Committed by Michael Ellerman
Browse files

powerpc/mm: Fix debugfs_simple_attr.cocci warnings



Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
for debugfs files.

Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 607ea509
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1889,11 +1889,11 @@ static int hpt_order_set(void *data, u64 val)
	return mmu_hash_ops.resize_hpt(val);
}

DEFINE_SIMPLE_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n");
DEFINE_DEBUGFS_ATTRIBUTE(fops_hpt_order, hpt_order_get, hpt_order_set, "%llu\n");

static int __init hash64_debugfs(void)
{
	if (!debugfs_create_file("hpt_order", 0600, powerpc_debugfs_root,
	if (!debugfs_create_file_unsafe("hpt_order", 0600, powerpc_debugfs_root,
					NULL, &fops_hpt_order)) {
		pr_err("lpar: unable to create hpt_order debugsfs file\n");
	}