RE: [PATCH v2 4/4] clk: Use ww_mutexes for clk_prepare_{lock/unlock}
kiran.padwal at smartplayin.com
kiran.padwal at smartplayin.com
Thu Sep 4 03:11:30 PDT 2014
Hi Stephen,
On Wednesday, September 3, 2014 9:01pm, "Stephen Boyd" <sboyd at codeaurora.org> said:
> Changing the rate of a "slow" clock can take 10s of milliseconds
> while changing the rate of a "fast" clock can be done in a few
<snip>
> -static void clk_prepare_lock(void)
> +static void __clk_unlock(struct list_head *list)
> +{
> + struct clk *entry, *temp;
> +
> + list_for_each_entry_safe (entry, temp, list, ww_list) {
Checkpatch warning for above line,
WARNING: space prohibited between function name and open parenthesis '('
> + list_del_init(&entry->ww_list);
> + ww_mutex_unlock(&entry->lock);
> + }
> +}
> +
> +static void clk_unlock(struct list_head *list, struct ww_acquire_ctx *ctx)
> +{
<snip>
> + ww_acquire_init(ctx, &prepare_ww_class);
> + do {
> + ret = __clk_prepare_lock(clk, list, ctx);
> + } while (ret == -EDEADLK);
> + ww_acquire_done(ctx);
> +}
> +
> +static int __clk_unprepare_lock(struct clk *clk, struct list_head *list,
> + struct ww_acquire_ctx *ctx)
Checkpatch error for above line,
ERROR: code indent should use tabs where possible
Best Regards,
Kiran Padwal
> +{
> + int ret;
> +
> + do {
> + ret = clk_lock_one(clk, list, ctx);
> + if (ret == -EDEADLK)
> + return ret;
> +
> + if (clk->prepare_count > 1)
> + break;
> + } while ((clk = clk->parent));
> +
> + return 0;
> +}
More information about the linux-arm-kernel
mailing list