Re: [PATCH] clk: Remove recursion in clk_core_{prepare,enable}()

From: kbuild test robot
Date: Sat Jul 29 2017 - 03:17:56 EST


Hi Stephen,

[auto build test WARNING on clk/clk-next]
[also build test WARNING on v4.13-rc2 next-20170728]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Stephen-Boyd/clk-Remove-recursion-in-clk_core_-prepare-enable/20170728-114840
base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: x86_64-randconfig-v0-07291446 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers//clk/clk.c: In function 'clk_core_enable':
>> drivers//clk/clk.c:658: warning: unused variable 'prev'

vim +/prev +658 drivers//clk/clk.c

654
655 static int clk_core_enable(struct clk_core *core)
656 {
657 int ret = 0;
> 658 struct clk_core *tmp, *parent, *prev;
659 LIST_HEAD(head);
660
661 lockdep_assert_held(&enable_lock);
662
663 while (core) {
664 list_add(&core->enable_list, &head);
665 /* Stop once we see a clk that is already enabled */
666 if (core->enable_count)
667 break;
668 core = core->parent;
669 }
670
671 list_for_each_entry_safe(core, tmp, &head, enable_list) {
672 list_del_init(&core->enable_list);
673
674 if (WARN_ON(core->prepare_count == 0)) {
675 ret = -ESHUTDOWN;
676 goto err;
677 }
678
679 if (core->enable_count == 0) {
680 trace_clk_enable_rcuidle(core);
681
682 if (core->ops->enable)
683 ret = core->ops->enable(core->hw);
684
685 trace_clk_enable_complete_rcuidle(core);
686
687 if (ret)
688 goto err;
689 }
690
691 core->enable_count++;
692 }
693
694 return 0;
695 err:
696 parent = core->parent;
697 list_for_each_entry_safe_continue(core, tmp, &head, enable_list)
698 list_del_init(&core->enable_list);
699 clk_core_disable(parent);
700 return ret;
701 }
702

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip