From: Stephen Boyd Date: Mon, 4 Jun 2018 19:32:28 +0000 (-0700) Subject: Merge branches 'clk-imx7d', 'clk-hisi-stub', 'clk-mvebu', 'clk-imx6-epit' and 'clk... X-Git-Tag: v4.18-rc1~79^2~5 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ef1ae47094b506b0194b251888166809e9258cf8;p=uclinux-h8%2Flinux.git Merge branches 'clk-imx7d', 'clk-hisi-stub', 'clk-mvebu', 'clk-imx6-epit' and 'clk-debugfs-simple' into clk-next * clk-imx7d: clk: imx7d: reset parent for mipi csi root clk: imx7d: fix mipi dphy div parent * clk-hisi-stub: clk/driver/hisi: Consolidate the Kconfig for the CLOCK_STUB * clk-mvebu: clk: mvebu: use correct bit for 98DX3236 NAND * clk-imx6-epit: clk: imx6: add EPIT clock support * clk-debugfs-simple: clk: Return void from debug_init op clk: remove clk_debugfs_add_file() clk: tegra: no need to check return value of debugfs_create functions clk: davinci: no need to check return value of debugfs_create functions clk: bcm2835: no need to check return value of debugfs_create functions clk: no need to check return value of debugfs_create functions --- ef1ae47094b506b0194b251888166809e9258cf8 diff --cc drivers/clk/clk.c index 9cd7cae221dd,ea67ac81c6f9,ea67ac81c6f9,ea67ac81c6f9,ea67ac81c6f9,59207cd6138a..f9deb2f9b95d --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@@@@@@ -2613,81 -2608,81 -2608,81 -2608,81 -2608,81 -2608,31 +2613,31 @@@@@@@ static int possible_parents_show(struc } DEFINE_SHOW_ATTRIBUTE(possible_parents); ----- static int clk_debug_create_one(struct clk_core *core, struct dentry *pdentry) +++++ static void clk_debug_create_one(struct clk_core *core, struct dentry *pdentry) { ----- struct dentry *d; ----- int ret = -ENOMEM; ---- ---- if (!core || !pdentry) { ---- ret = -EINVAL; ---- goto out; ---- } ---- ---- d = debugfs_create_dir(core->name, pdentry); ---- if (!d) ---- goto out; ---- ---- core->dentry = d; ---- ---- d = debugfs_create_ulong("clk_rate", 0444, core->dentry, &core->rate); ---- if (!d) ---- goto err_out; ---- ---- d = debugfs_create_ulong("clk_accuracy", 0444, core->dentry, ---- &core->accuracy); ---- if (!d) ---- goto err_out; ---- ---- d = debugfs_create_u32("clk_phase", 0444, core->dentry, &core->phase); ---- if (!d) ---- goto err_out; +++++ struct dentry *root; - if (!core || !pdentry) { - ret = -EINVAL; - goto out; - } ---- d = debugfs_create_file("clk_flags", 0444, core->dentry, core, ---- &clk_flags_fops); ---- if (!d) ---- goto err_out; ---- ---- d = debugfs_create_u32("clk_prepare_count", 0444, core->dentry, ---- &core->prepare_count); ---- if (!d) ---- goto err_out; ---- ---- d = debugfs_create_u32("clk_enable_count", 0444, core->dentry, ---- &core->enable_count); ---- if (!d) ---- goto err_out; ---- ---- d = debugfs_create_u32("clk_protect_count", 0444, core->dentry, ---- &core->protect_count); ---- if (!d) ---- goto err_out; ---- ---- d = debugfs_create_u32("clk_notifier_count", 0444, core->dentry, ---- &core->notifier_count); ---- if (!d) ---- goto err_out; +++++ if (!core || !pdentry) +++++ return; - d = debugfs_create_dir(core->name, pdentry); - if (!d) - goto out; ---- if (core->num_parents > 1) { ---- d = debugfs_create_file("clk_possible_parents", 0444, ---- core->dentry, core, &possible_parents_fops); ---- if (!d) ---- goto err_out; ---- } +++++ root = debugfs_create_dir(core->name, pdentry); +++++ core->dentry = root; - core->dentry = d; - - d = debugfs_create_ulong("clk_rate", 0444, core->dentry, &core->rate); - if (!d) - goto err_out; - - d = debugfs_create_ulong("clk_accuracy", 0444, core->dentry, - &core->accuracy); - if (!d) - goto err_out; - - d = debugfs_create_u32("clk_phase", 0444, core->dentry, &core->phase); - if (!d) - goto err_out; - - d = debugfs_create_file("clk_flags", 0444, core->dentry, core, - &clk_flags_fops); - if (!d) - goto err_out; - - d = debugfs_create_u32("clk_prepare_count", 0444, core->dentry, - &core->prepare_count); - if (!d) - goto err_out; - - d = debugfs_create_u32("clk_enable_count", 0444, core->dentry, - &core->enable_count); - if (!d) - goto err_out; - - d = debugfs_create_u32("clk_protect_count", 0444, core->dentry, - &core->protect_count); - if (!d) - goto err_out; - - d = debugfs_create_u32("clk_notifier_count", 0444, core->dentry, - &core->notifier_count); - if (!d) - goto err_out; - - if (core->num_parents > 1) { - d = debugfs_create_file("clk_possible_parents", 0444, - core->dentry, core, &possible_parents_fops); - if (!d) ---- if (core->ops->debug_init) { ---- ret = core->ops->debug_init(core->hw, core->dentry); ---- if (ret) ----- goto err_out; ----- } +++++ debugfs_create_ulong("clk_rate", 0444, root, &core->rate); +++++ debugfs_create_ulong("clk_accuracy", 0444, root, &core->accuracy); +++++ debugfs_create_u32("clk_phase", 0444, root, &core->phase); +++++ debugfs_create_file("clk_flags", 0444, root, core, &clk_flags_fops); +++++ debugfs_create_u32("clk_prepare_count", 0444, root, &core->prepare_count); +++++ debugfs_create_u32("clk_enable_count", 0444, root, &core->enable_count); +++++ debugfs_create_u32("clk_protect_count", 0444, root, &core->protect_count); +++++ debugfs_create_u32("clk_notifier_count", 0444, root, &core->notifier_count); - if (core->ops->debug_init) { - ret = core->ops->debug_init(core->hw, core->dentry); - if (ret) - goto err_out; - } ---- ret = 0; ---- goto out; +++++ if (core->num_parents > 1) +++++ debugfs_create_file("clk_possible_parents", 0444, root, core, +++++ &possible_parents_fops); - ret = 0; - goto out; - ----- err_out: ----- debugfs_remove_recursive(core->dentry); ----- core->dentry = NULL; ----- out: ----- return ret; +++++ if (core->ops->debug_init) +++++ core->ops->debug_init(core->hw, core->dentry); } /**