tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/asus-e100h-4.10 head: c86c0067e6111324a39f523c250c8b1089b1d822 commit: 19a80107e5cf1d2d02b678bb086f305a05e4f692 [18/26] clk: x86: Add Atom PMC platform clocks config: x86_64-randconfig-b0-02240418 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: git checkout 19a80107e5cf1d2d02b678bb086f305a05e4f692 # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
^~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:141:24: note: in expansion of macro 'to_clk_plt' struct clk_plt *clk = to_clk_plt(hw); ^~~~~~~~~~ include/linux/kernel.h:850:48: note: (near initialization for 'clk') const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/clk/x86/clk-pmc-atom.c:51:25: note: in expansion of macro 'container_of' #define to_clk_plt(_hw) container_of(_hw, struct clk_plt, hw) ^~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:141:24: note: in expansion of macro 'to_clk_plt' struct clk_plt *clk = to_clk_plt(hw); ^~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c: In function 'plt_clk_is_enabled': include/linux/kernel.h:850:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/clk/x86/clk-pmc-atom.c:51:25: note: in expansion of macro 'container_of' #define to_clk_plt(_hw) container_of(_hw, struct clk_plt, hw) ^~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:148:24: note: in expansion of macro 'to_clk_plt' struct clk_plt *clk = to_clk_plt(hw); ^~~~~~~~~~ include/linux/kernel.h:850:48: note: (near initialization for 'clk') const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ^ drivers/clk/x86/clk-pmc-atom.c:51:25: note: in expansion of macro 'container_of' #define to_clk_plt(_hw) container_of(_hw, struct clk_plt, hw) ^~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:148:24: note: in expansion of macro 'to_clk_plt' struct clk_plt *clk = to_clk_plt(hw); ^~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c: At top level: drivers/clk/x86/clk-pmc-atom.c:156:21: error: variable 'plt_clk_ops' has initializer but incomplete type static const struct clk_ops plt_clk_ops = { ^~~~~~~ drivers/clk/x86/clk-pmc-atom.c:157:2: error: unknown field 'enable' specified in initializer .enable = plt_clk_enable, ^ drivers/clk/x86/clk-pmc-atom.c:157:12: warning: excess elements in struct initializer .enable = plt_clk_enable, ^~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:157:12: note: (near initialization for 'plt_clk_ops') drivers/clk/x86/clk-pmc-atom.c:158:2: error: unknown field 'disable' specified in initializer .disable = plt_clk_disable, ^ drivers/clk/x86/clk-pmc-atom.c:158:13: warning: excess elements in struct initializer .disable = plt_clk_disable, ^~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:158:13: note: (near initialization for 'plt_clk_ops') drivers/clk/x86/clk-pmc-atom.c:159:2: error: unknown field 'is_enabled' specified in initializer .is_enabled = plt_clk_is_enabled, ^ drivers/clk/x86/clk-pmc-atom.c:159:16: warning: excess elements in struct initializer .is_enabled = plt_clk_is_enabled, ^~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:159:16: note: (near initialization for 'plt_clk_ops') drivers/clk/x86/clk-pmc-atom.c:160:2: error: unknown field 'get_parent' specified in initializer .get_parent = plt_clk_get_parent, ^ drivers/clk/x86/clk-pmc-atom.c:160:16: warning: excess elements in struct initializer .get_parent = plt_clk_get_parent, ^~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:160:16: note: (near initialization for 'plt_clk_ops') drivers/clk/x86/clk-pmc-atom.c:161:2: error: unknown field 'set_parent' specified in initializer .set_parent = plt_clk_set_parent, ^ drivers/clk/x86/clk-pmc-atom.c:161:16: warning: excess elements in struct initializer .set_parent = plt_clk_set_parent, ^~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:161:16: note: (near initialization for 'plt_clk_ops') drivers/clk/x86/clk-pmc-atom.c:162:2: error: unknown field 'determine_rate' specified in initializer .determine_rate = __clk_mux_determine_rate, ^ drivers/clk/x86/clk-pmc-atom.c:162:20: error: '__clk_mux_determine_rate' undeclared here (not in a function) .determine_rate = __clk_mux_determine_rate, ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:162:20: warning: excess elements in struct initializer drivers/clk/x86/clk-pmc-atom.c:162:20: note: (near initialization for 'plt_clk_ops') drivers/clk/x86/clk-pmc-atom.c: In function 'plt_clk_register': drivers/clk/x86/clk-pmc-atom.c:171:23: error: storage size of 'init' isn't known struct clk_init_data init; ^~~~ drivers/clk/x86/clk-pmc-atom.c:188:8: error: implicit declaration of function 'devm_clk_hw_register' [-Werror=implicit-function-declaration] ret = devm_clk_hw_register(&pdev->dev, &pclk->hw); ^~~~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:171:23: warning: unused variable 'init' [-Wunused-variable] struct clk_init_data init; ^~~~ drivers/clk/x86/clk-pmc-atom.c: In function 'plt_clk_register_fixed_rate': drivers/clk/x86/clk-pmc-atom.c:221:14: error: implicit declaration of function 'clk_hw_register_fixed_rate' [-Werror=implicit-function-declaration] pclk->clk = clk_hw_register_fixed_rate(&pdev->dev, name, parent_name, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c:221:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion] pclk->clk = clk_hw_register_fixed_rate(&pdev->dev, name, parent_name, ^ drivers/clk/x86/clk-pmc-atom.c:228:3: error: implicit declaration of function 'clk_hw_unregister_fixed_rate' [-Werror=implicit-function-declaration] clk_hw_unregister_fixed_rate(pclk->clk); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/x86/clk-pmc-atom.c: At top level:
drivers/clk/x86/clk-pmc-atom.c:156:29: error: storage size of 'plt_clk_ops' isn't known
static const struct clk_ops plt_clk_ops = { ^~~~~~~~~~~ cc1: some warnings being treated as errors
vim +156 drivers/clk/x86/clk-pmc-atom.c
150 151 value = readl(clk->reg); 152 153 return plt_reg_to_enabled(value); 154 } 155
156 static const struct clk_ops plt_clk_ops = {
157 .enable = plt_clk_enable, 158 .disable = plt_clk_disable, 159 .is_enabled = plt_clk_is_enabled, 160 .get_parent = plt_clk_get_parent, 161 .set_parent = plt_clk_set_parent, 162 .determine_rate = __clk_mux_determine_rate, 163 }; 164 165 static struct clk_plt *plt_clk_register(struct platform_device *pdev, int id, 166 void __iomem *base, 167 const char **parent_names, 168 int num_parents) 169 { 170 struct clk_plt *pclk; 171 struct clk_init_data init; 172 int ret; 173 174 pclk = devm_kzalloc(&pdev->dev, sizeof(*pclk), GFP_KERNEL); 175 if (!pclk) 176 return ERR_PTR(-ENOMEM); 177 178 init.name = kasprintf(GFP_KERNEL, "%s_%d", PLT_CLK_NAME_BASE, id); 179 init.ops = &plt_clk_ops; 180 init.flags = 0; 181 init.parent_names = parent_names; 182 init.num_parents = num_parents; 183 184 pclk->hw.init = &init; 185 pclk->reg = base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE; 186 spin_lock_init(&pclk->lock); 187 188 ret = devm_clk_hw_register(&pdev->dev, &pclk->hw); 189 if (ret) { 190 pclk = ERR_PTR(ret); 191 goto err_free_init; 192 } 193 194 pclk->lookup = clkdev_hw_create(&pclk->hw, init.name, NULL); 195 if (!pclk->lookup) { 196 pclk = ERR_PTR(-ENOMEM); 197 goto err_free_init; 198 } 199 200 err_free_init: 201 kfree(init.name); 202 return pclk; 203 } 204 205 static void plt_clk_unregister(struct clk_plt *pclk) 206 { 207 clkdev_drop(pclk->lookup); 208 } 209 210 static struct clk_plt_fixed *plt_clk_register_fixed_rate(struct platform_device *pdev, 211 const char *name, 212 const char *parent_name, 213 unsigned long fixed_rate) 214 { 215 struct clk_plt_fixed *pclk; 216 217 pclk = devm_kzalloc(&pdev->dev, sizeof(*pclk), GFP_KERNEL); 218 if (!pclk) 219 return ERR_PTR(-ENOMEM); 220
221 pclk->clk = clk_hw_register_fixed_rate(&pdev->dev, name, parent_name,
222 0, fixed_rate); 223 if (IS_ERR(pclk->clk)) 224 return ERR_CAST(pclk->clk);
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation