tree:
https://github.com/thesofproject/linux devel-catchup-202005220530
head: 2e9428fd0d1f29b48cdd226fd67bb8e2a1a10cbc
commit: 99643a70e4da2e6cb09c6bc0558492cb48cb8d2c [3/3] Merge branch
'sound/upstream-20200521' into merge/sound-upstream-20200521
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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 checkout 99643a70e4da2e6cb09c6bc0558492cb48cb8d2c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/soundwire/intel_init.c: In function 'sdw_intel_cleanup':
drivers/soundwire/intel_init.c:73:10: error: implicit declaration of function
'sdw_master_device_del' [-Werror=implicit-function-declaration]
73 | ret = sdw_master_device_del(link->md);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/soundwire/intel_init.c: In function 'sdw_intel_probe_controller':
drivers/soundwire/intel_init.c:242:42: error: invalid use of undefined type 'struct
sdw_link_ops'
242 | ret = driver_register(sdw_intel_link_ops.driver);
| ^
drivers/soundwire/intel_init.c:265:8: error: implicit declaration of function
'sdw_master_device_add' [-Werror=implicit-function-declaration]
265 | md = sdw_master_device_add(res->parent,
| ^~~~~~~~~~~~~~~~~~~~~
> drivers/soundwire/intel_init.c:265:6: warning: assignment to
'struct sdw_master_device *' from 'int' makes pointer from integer without
a cast [-Wint-conversion]
265 | md = sdw_master_device_add(res->parent,
| ^
drivers/soundwire/intel_init.c:304:38: error: invalid use of undefined type 'struct
sdw_link_ops'
304 | driver_unregister(sdw_intel_link_ops.driver);
| ^
drivers/soundwire/intel_init.c: In function 'sdw_intel_startup_controller':
drivers/soundwire/intel_init.c:349:3: error: implicit declaration of function
'sdw_master_device_startup' [-Werror=implicit-function-declaration]
349 | sdw_master_device_startup(md);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/soundwire/intel_init.c: In function 'sdw_intel_exit':
drivers/soundwire/intel_init.c:458:38: error: invalid use of undefined type 'struct
sdw_link_ops'
458 | driver_unregister(sdw_intel_link_ops.driver);
| ^
drivers/soundwire/intel_init.c: In function 'sdw_intel_process_wakeen_event':
drivers/soundwire/intel_init.c:471:3: error: implicit declaration of function
'sdw_master_device_process_wake_event' [-Werror=implicit-function-declaration]
471 | sdw_master_device_process_wake_event(link->md);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +265 drivers/soundwire/intel_init.c
f33079bb397b9b Bard Liao 2019-09-24 194
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 195 static struct sdw_intel_ctx
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 196 *sdw_intel_probe_controller(struct
sdw_intel_res *res)
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 197 {
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 198 struct sdw_intel_link_res *link;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 199 struct sdw_intel_ctx *ctx;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 200 struct acpi_device *adev;
946bab81f3286c Pierre-Louis Bossart 2020-02-24 201 struct sdw_master_device *md;
89a76a6409cac5 Bard Liao 2019-12-27 202 struct sdw_slave *slave;
81a7faeadb8f72 Bard liao 2020-01-09 203 struct list_head *node;
89a76a6409cac5 Bard Liao 2019-12-27 204 struct sdw_bus *bus;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 205 u32 link_mask;
89a76a6409cac5 Bard Liao 2019-12-27 206 int num_slaves = 0;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 207 int count;
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 208 int ret;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 209 int i;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 210
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 211 if (!res)
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 212 return NULL;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 213
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 214 if
(acpi_bus_get_device(res->handle, &adev))
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 215 return NULL;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 216
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 217 if (!res->count)
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 218 return NULL;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 219
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 220 count = res->count;
d62a7d41f38e1d Vinod Koul 2017-12-14 221 dev_dbg(&adev->dev,
"Creating %d SDW Link devices\n", count);
d62a7d41f38e1d Vinod Koul 2017-12-14 222
d62a7d41f38e1d Vinod Koul 2017-12-14 223 ctx = kzalloc(sizeof(*ctx),
GFP_KERNEL);
d62a7d41f38e1d Vinod Koul 2017-12-14 224 if (!ctx)
d62a7d41f38e1d Vinod Koul 2017-12-14 225 return NULL;
d62a7d41f38e1d Vinod Koul 2017-12-14 226
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 227 ctx->links = kcalloc(count,
sizeof(*ctx->links), GFP_KERNEL);
d62a7d41f38e1d Vinod Koul 2017-12-14 228 if (!ctx->links)
d62a7d41f38e1d Vinod Koul 2017-12-14 229 goto link_err;
d62a7d41f38e1d Vinod Koul 2017-12-14 230
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 231 ctx->count = count;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 232 ctx->mmio_base =
res->mmio_base;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 233 ctx->link_mask =
res->link_mask;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 234 ctx->handle = res->handle;
01f59e2d608aef Pierre-Louis Bossart 2019-12-02 235 mutex_init(&ctx->shim_lock);
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 236
d62a7d41f38e1d Vinod Koul 2017-12-14 237 link = ctx->links;
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 238 link_mask = ctx->link_mask;
d62a7d41f38e1d Vinod Koul 2017-12-14 239
f33079bb397b9b Bard Liao 2019-09-24 240
INIT_LIST_HEAD(&ctx->link_list);
f33079bb397b9b Bard Liao 2019-09-24 241
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 242 ret =
driver_register(sdw_intel_link_ops.driver);
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 243 if (ret) {
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 244 dev_err(&adev->dev,
"failed to register sdw master driver: %d\n", ret);
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 245 goto register_err;
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 246 }
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 247
d62a7d41f38e1d Vinod Koul 2017-12-14 248 /* Create SDW Master devices */
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 249 for (i = 0; i < count; i++,
link++) {
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 250 if (link_mask &&
!(link_mask & BIT(i)))
50302fc7b936c1 Pierre-Louis Bossart 2019-08-05 251 continue;
50302fc7b936c1 Pierre-Louis Bossart 2019-08-05 252
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 253 link->mmio_base =
res->mmio_base;
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 254 link->registers =
res->mmio_base + SDW_LINK_BASE
d62a7d41f38e1d Vinod Koul 2017-12-14 255 + (SDW_LINK_SIZE * i);
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 256 link->shim = res->mmio_base +
SDW_SHIM_BASE;
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 257 link->alh = res->mmio_base +
SDW_ALH_BASE;
f98f690fb03c2a Pierre-Louis Bossart 2019-12-11 258 link->ops = res->ops;
4b206d34b92224 Rander Wang 2019-12-11 259 link->dev = res->dev;
25f90d16b4adfc Pierre-Louis Bossart 2019-12-03 260 link->clock_stop_quirks =
res->clock_stop_quirks;
91ed8f429393a0 Pierre-Louis Bossart 2020-02-05 261 link->shim_lock =
&ctx->shim_lock;
8d179b1844c323 Pierre-Louis Bossart 2020-02-06 262 link->shim_mask =
&ctx->shim_mask;
fbe891a6ebc46f Pierre-Louis Bossart 2020-02-13 263 link->link_mask = link_mask;
91ed8f429393a0 Pierre-Louis Bossart 2020-02-05 264
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 @265 md =
sdw_master_device_add(res->parent,
946bab81f3286c Pierre-Louis Bossart 2020-02-24 266 acpi_fwnode_handle(adev),
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 267 &sdw_intel_link_ops,
946bab81f3286c Pierre-Louis Bossart 2020-02-24 268 i,
946bab81f3286c Pierre-Louis Bossart 2020-02-24 269 link);
c46302ec554c57 Vinod Koul 2018-04-26 270
946bab81f3286c Pierre-Louis Bossart 2020-02-24 271 if (IS_ERR(md)) {
946bab81f3286c Pierre-Louis Bossart 2020-02-24 272 dev_err(&adev->dev,
"Could not create link %d\n", i);
198e19ac4881e2 Bard liao 2020-01-10 273 goto err;
198e19ac4881e2 Bard liao 2020-01-10 274 }
f33079bb397b9b Bard Liao 2019-09-24 275
946bab81f3286c Pierre-Louis Bossart 2020-02-24 276 link->md = md;
91ed8f429393a0 Pierre-Louis Bossart 2020-02-05 277
f33079bb397b9b Bard Liao 2019-09-24 278 list_add_tail(&link->list,
&ctx->link_list);
89a76a6409cac5 Bard Liao 2019-12-27 279 bus = &link->cdns->bus;
89a76a6409cac5 Bard Liao 2019-12-27 280 /* Calculate number of slaves */
81a7faeadb8f72 Bard liao 2020-01-09 281 list_for_each(node,
&bus->slaves)
89a76a6409cac5 Bard Liao 2019-12-27 282 num_slaves++;
89a76a6409cac5 Bard Liao 2019-12-27 283 }
89a76a6409cac5 Bard Liao 2019-12-27 284
89a76a6409cac5 Bard Liao 2019-12-27 285 ctx->ids = kcalloc(num_slaves,
sizeof(*ctx->ids), GFP_KERNEL);
89a76a6409cac5 Bard Liao 2019-12-27 286 if (!ctx->ids)
89a76a6409cac5 Bard Liao 2019-12-27 287 goto err;
89a76a6409cac5 Bard Liao 2019-12-27 288
89a76a6409cac5 Bard Liao 2019-12-27 289 ctx->num_slaves = num_slaves;
89a76a6409cac5 Bard Liao 2019-12-27 290 i = 0;
89a76a6409cac5 Bard Liao 2019-12-27 291 list_for_each_entry(link,
&ctx->link_list, list) {
89a76a6409cac5 Bard Liao 2019-12-27 292 bus = &link->cdns->bus;
89a76a6409cac5 Bard Liao 2019-12-27 293 list_for_each_entry(slave,
&bus->slaves, node) {
89a76a6409cac5 Bard Liao 2019-12-27 294 ctx->ids[i].id = slave->id;
89a76a6409cac5 Bard Liao 2019-12-27 295 ctx->ids[i].link_id =
bus->link_id;
89a76a6409cac5 Bard Liao 2019-12-27 296 i++;
89a76a6409cac5 Bard Liao 2019-12-27 297 }
d62a7d41f38e1d Vinod Koul 2017-12-14 298 }
d62a7d41f38e1d Vinod Koul 2017-12-14 299
d62a7d41f38e1d Vinod Koul 2017-12-14 300 return ctx;
d62a7d41f38e1d Vinod Koul 2017-12-14 301
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 302 err:
946bab81f3286c Pierre-Louis Bossart 2020-02-24 303 ctx->count = i;
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 304
driver_unregister(sdw_intel_link_ops.driver);
2ef8387155a7b7 Pierre-Louis Bossart 2020-03-26 305 register_err:
8a0ded654c4de8 Pierre-Louis Bossart 2019-10-23 306 sdw_intel_cleanup(ctx);
d62a7d41f38e1d Vinod Koul 2017-12-14 307 link_err:
d62a7d41f38e1d Vinod Koul 2017-12-14 308 kfree(ctx);
d62a7d41f38e1d Vinod Koul 2017-12-14 309 return NULL;
d62a7d41f38e1d Vinod Koul 2017-12-14 310 }
d62a7d41f38e1d Vinod Koul 2017-12-14 311
:::::: The code at line 265 was first introduced by commit
:::::: 2ef8387155a7b77eed32f7cc5dd4b39a8f4e77dc soundwire: drivers/soundwire/intel_init.c:
use sdw_link_ops
:::::: TO: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
:::::: CC: Pierre Bossart <pierre-louis.bossart(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org