tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: 165087594d83615eb48f64ee09830ccccd7f4ae4
commit: e228c54ae3723655ad86be34cbac9dfdc42c47d1 [2/214] BACKPORT: clk: add clk_bulk_get
accessories
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout e228c54ae3723655ad86be34cbac9dfdc42c47d1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/cpumask.h:11:0,
from include/linux/rcupdate.h:40,
from include/linux/srcu.h:33,
from include/linux/notifier.h:15,
from include/linux/clk.h:17,
from drivers/clk/clk-bulk.c:19:
include/linux/bitmap.h: In function 'bitmap_empty':
include/linux/bitmap.h:310:36: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
return find_first_bit(src, nbits) == nbits;
^~
include/linux/bitmap.h: In function 'bitmap_full':
include/linux/bitmap.h:318:41: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
return find_first_zero_bit(src, nbits) == nbits;
^~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h: At top level:
include/linux/clk.h:199:57: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:223:60: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks)
^~~~~~~~~~~~~
include/linux/clk.h:268:17: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks);
^~~~~~~~~~~~~
include/linux/clk.h:312:19: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
const struct clk_bulk_data *clks);
^~~~~~~~~~~~~
include/linux/clk.h:346:50: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
void clk_bulk_disable(int num_clks, const struct clk_bulk_data *clks);
^~~~~~~~~~~~~
include/linux/clk.h:378:40: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
void clk_bulk_put(int num_clks, struct clk_bulk_data *clks);
^~~~~~~~~~~~~
> drivers/clk/clk-bulk.c:23:40: warning: 'struct
clk_bulk_data' declared inside parameter list will not be visible outside of this
definition or declaration
void clk_bulk_put(int num_clks, struct clk_bulk_data
*clks)
^~~~~~~~~~~~~
> drivers/clk/clk-bulk.c:23:6: error: conflicting types for
'clk_bulk_put'
void clk_bulk_put(int num_clks, struct clk_bulk_data
*clks)
^~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:378:6: note: previous declaration of 'clk_bulk_put' was
here
void clk_bulk_put(int num_clks, struct clk_bulk_data *clks);
^~~~~~~~~~~~
drivers/clk/clk-bulk.c: In function 'clk_bulk_put':
> drivers/clk/clk-bulk.c:26:15: error: invalid use of undefined
type 'struct clk_bulk_data'
clk_put(clks[num_clks].clk);
^
> drivers/clk/clk-bulk.c:26:15: error: dereferencing pointer to
incomplete type 'struct clk_bulk_data'
drivers/clk/clk-bulk.c:27:7:
error: invalid use of undefined type 'struct clk_bulk_data'
clks[num_clks].clk = NULL;
^
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/clk.h:16,
from drivers/clk/clk-bulk.c:19:
drivers/clk/clk-bulk.c: At top level:
drivers/clk/clk-bulk.c:30:19: error: conflicting types for 'clk_bulk_put'
EXPORT_SYMBOL_GPL(clk_bulk_put);
^
include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/clk/clk-bulk.c:30:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(clk_bulk_put);
^~~~~~~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:378:6: note: previous declaration of 'clk_bulk_put' was
here
void clk_bulk_put(int num_clks, struct clk_bulk_data *clks);
^~~~~~~~~~~~
drivers/clk/clk-bulk.c:33:17: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
struct clk_bulk_data *clks)
^~~~~~~~~~~~~
> drivers/clk/clk-bulk.c:32:18: error: conflicting types for
'clk_bulk_get'
int __must_check clk_bulk_get(struct device *dev, int
num_clks,
^~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:267:18: note: previous declaration of 'clk_bulk_get' was
here
int __must_check clk_bulk_get(struct device *dev, int num_clks,
^~~~~~~~~~~~
drivers/clk/clk-bulk.c: In function 'clk_bulk_get':
drivers/clk/clk-bulk.c:39:7: error: invalid use of undefined type 'struct
clk_bulk_data'
clks[i].clk = NULL;
^
drivers/clk/clk-bulk.c:39:7: error: dereferencing pointer to incomplete type
'struct clk_bulk_data'
drivers/clk/clk-bulk.c:42:7: error: invalid use of undefined type 'struct
clk_bulk_data'
clks[i].clk = clk_get(dev, clks[i].id);
^
drivers/clk/clk-bulk.c:42:34: error: invalid use of undefined type 'struct
clk_bulk_data'
clks[i].clk = clk_get(dev, clks[i].id);
^
drivers/clk/clk-bulk.c:43:18: error: invalid use of undefined type 'struct
clk_bulk_data'
if (IS_ERR(clks[i].clk)) {
^
drivers/clk/clk-bulk.c:44:22: error: invalid use of undefined type 'struct
clk_bulk_data'
ret = PTR_ERR(clks[i].clk);
^
drivers/clk/clk-bulk.c:46:9: error: invalid use of undefined type 'struct
clk_bulk_data'
clks[i].id, ret);
^
drivers/clk/clk-bulk.c:47:8: error: invalid use of undefined type 'struct
clk_bulk_data'
clks[i].clk = NULL;
^
> drivers/clk/clk-bulk.c:55:18: warning: passing argument 2 of
'clk_bulk_put' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_put(i, clks);
^~~~
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/clk.h:16,
from drivers/clk/clk-bulk.c:19:
drivers/clk/clk-bulk.c:30:19: note: expected 'struct clk_bulk_data *' but
argument is of type 'struct clk_bulk_data *'
EXPORT_SYMBOL_GPL(clk_bulk_put);
^
include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/clk/clk-bulk.c:30:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(clk_bulk_put);
^~~~~~~~~~~~~~~~~
drivers/clk/clk-bulk.c: At top level:
drivers/clk/clk-bulk.c:59:15: error: conflicting types for 'clk_bulk_get'
EXPORT_SYMBOL(clk_bulk_get);
^
include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/clk/clk-bulk.c:59:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(clk_bulk_get);
^~~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:267:18: note: previous declaration of 'clk_bulk_get' was
here
int __must_check clk_bulk_get(struct device *dev, int num_clks,
^~~~~~~~~~~~
drivers/clk/clk-bulk.c:120:50: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
void clk_bulk_disable(int num_clks, const struct clk_bulk_data *clks)
^~~~~~~~~~~~~
> drivers/clk/clk-bulk.c:120:6: error: conflicting types for
'clk_bulk_disable'
void clk_bulk_disable(int num_clks, const struct
clk_bulk_data *clks)
^~~~~~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:346:6: note: previous declaration of 'clk_bulk_disable' was
here
void clk_bulk_disable(int num_clks, const struct clk_bulk_data *clks);
^~~~~~~~~~~~~~~~
drivers/clk/clk-bulk.c: In function 'clk_bulk_disable':
drivers/clk/clk-bulk.c:124:19: error: invalid use of undefined type 'struct
clk_bulk_data'
clk_disable(clks[num_clks].clk);
^
> drivers/clk/clk-bulk.c:124:19: error: dereferencing pointer to
incomplete type 'const struct clk_bulk_data'
In file included from
include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/clk.h:16,
from drivers/clk/clk-bulk.c:19:
drivers/clk/clk-bulk.c: At top level:
drivers/clk/clk-bulk.c:126:19: error: conflicting types for 'clk_bulk_disable'
EXPORT_SYMBOL_GPL(clk_bulk_disable);
^
include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/clk/clk-bulk.c:126:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(clk_bulk_disable);
^~~~~~~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:346:6: note: previous declaration of 'clk_bulk_disable' was
here
void clk_bulk_disable(int num_clks, const struct clk_bulk_data *clks);
^~~~~~~~~~~~~~~~
drivers/clk/clk-bulk.c:136:61: warning: 'struct clk_bulk_data' declared inside
parameter list will not be visible outside of this definition or declaration
int __must_check clk_bulk_enable(int num_clks, const struct clk_bulk_data *clks)
^~~~~~~~~~~~~
> drivers/clk/clk-bulk.c:136:18: error: conflicting types for
'clk_bulk_enable'
int __must_check clk_bulk_enable(int num_clks, const
struct clk_bulk_data *clks)
^~~~~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:311:18: note: previous declaration of 'clk_bulk_enable' was
here
int __must_check clk_bulk_enable(int num_clks,
^~~~~~~~~~~~~~~
drivers/clk/clk-bulk.c: In function 'clk_bulk_enable':
drivers/clk/clk-bulk.c:142:24: error: invalid use of undefined type 'struct
clk_bulk_data'
ret = clk_enable(clks[i].clk);
^
drivers/clk/clk-bulk.c:142:24: error: dereferencing pointer to incomplete type
'const struct clk_bulk_data'
In file included from include/linux/kernel.h:13:0,
from include/linux/clk.h:16,
from drivers/clk/clk-bulk.c:19:
drivers/clk/clk-bulk.c:145:9: error: invalid use of undefined type 'struct
clk_bulk_data'
clks[i].id, ret);
^
include/linux/printk.h:252:33: note: in definition of macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
> drivers/clk/clk-bulk.c:153:22: warning: passing argument 2 of
'clk_bulk_disable' from incompatible pointer type [-Wincompatible-pointer-types]
clk_bulk_disable(i, clks);
^~~~
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/clk.h:16,
from drivers/clk/clk-bulk.c:19:
drivers/clk/clk-bulk.c:126:19: note: expected 'const struct clk_bulk_data *'
but argument is of type 'const struct clk_bulk_data *'
EXPORT_SYMBOL_GPL(clk_bulk_disable);
^
include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/clk/clk-bulk.c:126:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(clk_bulk_disable);
^~~~~~~~~~~~~~~~~
drivers/clk/clk-bulk.c: At top level:
drivers/clk/clk-bulk.c:157:19: error: conflicting types for 'clk_bulk_enable'
EXPORT_SYMBOL_GPL(clk_bulk_enable);
^
include/linux/export.h:57:21: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
drivers/clk/clk-bulk.c:157:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(clk_bulk_enable);
^~~~~~~~~~~~~~~~~
In file included from drivers/clk/clk-bulk.c:19:0:
include/linux/clk.h:311:18: note: previous declaration of 'clk_bulk_enable' was
here
int __must_check clk_bulk_enable(int num_clks,
^~~~~~~~~~~~~~~
vim +/clk_bulk_put +23 drivers/clk/clk-bulk.c
22
23 void clk_bulk_put(int num_clks, struct clk_bulk_data *clks)
24 {
25 while (--num_clks >= 0) {
26 clk_put(clks[num_clks].clk);
27 clks[num_clks].clk =
NULL;
28 }
29 }
30 EXPORT_SYMBOL_GPL(clk_bulk_put);
31
32 int __must_check clk_bulk_get(struct device *dev, int num_clks,
33 struct clk_bulk_data *clks)
34 {
35 int ret;
36 int i;
37
38 for (i = 0; i < num_clks; i++)
39 clks[i].clk = NULL;
40
41 for (i = 0; i < num_clks; i++) {
42 clks[i].clk = clk_get(dev, clks[i].id);
43 if (IS_ERR(clks[i].clk)) {
44 ret = PTR_ERR(clks[i].clk);
45 dev_err(dev, "Failed to get clk '%s': %d\n",
46 clks[i].id, ret);
47 clks[i].clk = NULL;
48 goto err;
49 }
50 }
51
52 return 0;
53
54 err:
55 clk_bulk_put(i, clks);
56
57 return ret;
58 }
59 EXPORT_SYMBOL(clk_bulk_get);
60
61 #ifdef CONFIG_HAVE_CLK_PREPARE
62
63 /**
64 * clk_bulk_unprepare - undo preparation of a set of clock sources
65 * @num_clks: the number of clk_bulk_data
66 * @clks: the clk_bulk_data table being unprepared
67 *
68 * clk_bulk_unprepare may sleep, which differentiates it from clk_bulk_disable.
69 * Returns 0 on success, -EERROR otherwise.
70 */
71 void clk_bulk_unprepare(int num_clks, const struct clk_bulk_data *clks)
72 {
73 while (--num_clks >= 0)
74 clk_unprepare(clks[num_clks].clk);
75 }
76 EXPORT_SYMBOL_GPL(clk_bulk_unprepare);
77
78 /**
79 * clk_bulk_prepare - prepare a set of clocks
80 * @num_clks: the number of clk_bulk_data
81 * @clks: the clk_bulk_data table being prepared
82 *
83 * clk_bulk_prepare may sleep, which differentiates it from clk_bulk_enable.
84 * Returns 0 on success, -EERROR otherwise.
85 */
86 int __must_check clk_bulk_prepare(int num_clks,
87 const struct clk_bulk_data *clks)
88 {
89 int ret;
90 int i;
91
92 for (i = 0; i < num_clks; i++) {
93 ret = clk_prepare(clks[i].clk);
94 if (ret) {
95 pr_err("Failed to prepare clk '%s': %d\n",
96 clks[i].id, ret);
97 goto err;
98 }
99 }
100
101 return 0;
102
103 err:
104 clk_bulk_unprepare(i, clks);
105
106 return ret;
107 }
108
109 #endif /* CONFIG_HAVE_CLK_PREPARE */
110
111 /**
112 * clk_bulk_disable - gate a set of clocks
113 * @num_clks: the number of clk_bulk_data
114 * @clks: the clk_bulk_data table being gated
115 *
116 * clk_bulk_disable must not sleep, which differentiates it from
117 * clk_bulk_unprepare. clk_bulk_disable must be called before
118 * clk_bulk_unprepare.
119 */
120 void clk_bulk_disable(int num_clks, const struct clk_bulk_data
*clks)
121 {
122
123 while (--num_clks >= 0)
124 clk_disable(clks[num_clks].clk);
125 }
126 EXPORT_SYMBOL_GPL(clk_bulk_disable);
127
128 /**
129 * clk_bulk_enable - ungate a set of clocks
130 * @num_clks: the number of clk_bulk_data
131 * @clks: the clk_bulk_data table being ungated
132 *
133 * clk_bulk_enable must not sleep
134 * Returns 0 on success, -EERROR otherwise.
135 */
136 int __must_check clk_bulk_enable(int num_clks, const struct
clk_bulk_data *clks)
137 {
138 int ret;
139 int i;
140
141 for (i = 0; i < num_clks; i++) {
142 ret = clk_enable(clks[i].clk);
143 if (ret) {
144 pr_err("Failed to enable clk '%s': %d\n",
145 clks[i].id, ret);
146 goto err;
147 }
148 }
149
150 return 0;
151
152 err:
153 clk_bulk_disable(i, clks);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org