Hi Christian, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on v5.1-rc3 next-20190404] [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/Christian-Gromm/staging-most-switch-to-configfs/20190402-023820 config: x86_64-randconfig-s3-04050831 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/staging/most/configfs.o: In function `most_snd_grp_make_item': >> drivers/staging/most/configfs.c:462: undefined reference to `config_item_init_type_name' drivers/staging/most/configfs.o: In function `most_sound_make_group': >> drivers/staging/most/configfs.c:545: undefined reference to `config_group_init_type_name' drivers/staging/most/configfs.o: In function `most_common_make_item': drivers/staging/most/configfs.c:383: undefined reference to `config_item_init_type_name' drivers/staging/most/configfs.o: In function `most_register_configfs_subsys': >> drivers/staging/most/configfs.c:581: undefined reference to `configfs_register_subsystem' drivers/staging/most/configfs.o: In function `most_deregister_configfs_subsys': >> drivers/staging/most/configfs.c:602: undefined reference to `configfs_unregister_subsystem' drivers/staging/most/configfs.o: In function `configfs_init': >> drivers/staging/most/configfs.c:608: undefined reference to `config_group_init' drivers/staging/most/configfs.c:611: undefined reference to `config_group_init' drivers/staging/most/configfs.c:614: undefined reference to `config_group_init' drivers/staging/most/configfs.c:617: undefined reference to `config_group_init' vim +462 drivers/staging/most/configfs.c 4f1a813b9 Christian Gromm 2019-04-01 452 4f1a813b9 Christian Gromm 2019-04-01 453 static struct config_item *most_snd_grp_make_item(struct config_group *group, 4f1a813b9 Christian Gromm 2019-04-01 454 const char *name) 4f1a813b9 Christian Gromm 2019-04-01 455 { 4f1a813b9 Christian Gromm 2019-04-01 456 struct mdev_link *mdev_link; 4f1a813b9 Christian Gromm 2019-04-01 457 4f1a813b9 Christian Gromm 2019-04-01 458 mdev_link = kzalloc(sizeof(*mdev_link), GFP_KERNEL); 4f1a813b9 Christian Gromm 2019-04-01 459 if (!mdev_link) 4f1a813b9 Christian Gromm 2019-04-01 460 return ERR_PTR(-ENOMEM); 4f1a813b9 Christian Gromm 2019-04-01 461 4f1a813b9 Christian Gromm 2019-04-01 @462 config_item_init_type_name(&mdev_link->item, name, &mdev_link_type); 4f1a813b9 Christian Gromm 2019-04-01 463 mdev_link->create = 0; 4f1a813b9 Christian Gromm 2019-04-01 464 strcpy(mdev_link->name, name); 4f1a813b9 Christian Gromm 2019-04-01 465 strcpy(mdev_link->comp, "sound"); 4f1a813b9 Christian Gromm 2019-04-01 466 return &mdev_link->item; 4f1a813b9 Christian Gromm 2019-04-01 467 } 4f1a813b9 Christian Gromm 2019-04-01 468 4f1a813b9 Christian Gromm 2019-04-01 469 static ssize_t most_snd_grp_create_show(struct config_item *item, char *page) 4f1a813b9 Christian Gromm 2019-04-01 470 { 4f1a813b9 Christian Gromm 2019-04-01 471 return snprintf(page, PAGE_SIZE, "%d\n", to_most_snd_grp(item)->create); 4f1a813b9 Christian Gromm 2019-04-01 472 } 4f1a813b9 Christian Gromm 2019-04-01 473 4f1a813b9 Christian Gromm 2019-04-01 474 static ssize_t most_snd_grp_create_store(struct config_item *item, 4f1a813b9 Christian Gromm 2019-04-01 475 const char *page, size_t count) 4f1a813b9 Christian Gromm 2019-04-01 476 { 4f1a813b9 Christian Gromm 2019-04-01 477 struct most_snd_grp *snd_grp = to_most_snd_grp(item); 4f1a813b9 Christian Gromm 2019-04-01 478 int ret; 4f1a813b9 Christian Gromm 2019-04-01 479 bool tmp; 4f1a813b9 Christian Gromm 2019-04-01 480 4f1a813b9 Christian Gromm 2019-04-01 481 ret = kstrtobool(page, &tmp); 4f1a813b9 Christian Gromm 2019-04-01 482 if (ret) 4f1a813b9 Christian Gromm 2019-04-01 483 return ret; 4f1a813b9 Christian Gromm 2019-04-01 484 if (tmp) { 4f1a813b9 Christian Gromm 2019-04-01 485 ret = most_cfg_complete("sound"); 4f1a813b9 Christian Gromm 2019-04-01 486 if (ret) 4f1a813b9 Christian Gromm 2019-04-01 487 return ret; 4f1a813b9 Christian Gromm 2019-04-01 488 } 4f1a813b9 Christian Gromm 2019-04-01 489 snd_grp->create = tmp; 4f1a813b9 Christian Gromm 2019-04-01 490 return count; 4f1a813b9 Christian Gromm 2019-04-01 491 } 4f1a813b9 Christian Gromm 2019-04-01 492 4f1a813b9 Christian Gromm 2019-04-01 493 CONFIGFS_ATTR(most_snd_grp_, create); 4f1a813b9 Christian Gromm 2019-04-01 494 4f1a813b9 Christian Gromm 2019-04-01 495 static struct configfs_attribute *most_snd_grp_attrs[] = { 4f1a813b9 Christian Gromm 2019-04-01 496 &most_snd_grp_attr_create, 4f1a813b9 Christian Gromm 2019-04-01 497 NULL, 4f1a813b9 Christian Gromm 2019-04-01 498 }; 4f1a813b9 Christian Gromm 2019-04-01 499 4f1a813b9 Christian Gromm 2019-04-01 500 static void most_snd_grp_release(struct config_item *item) 4f1a813b9 Christian Gromm 2019-04-01 501 { 4f1a813b9 Christian Gromm 2019-04-01 502 struct most_snd_grp *group = to_most_snd_grp(item); 4f1a813b9 Christian Gromm 2019-04-01 503 4f1a813b9 Christian Gromm 2019-04-01 504 list_del(&group->list); 4f1a813b9 Christian Gromm 2019-04-01 505 kfree(group); 4f1a813b9 Christian Gromm 2019-04-01 506 } 4f1a813b9 Christian Gromm 2019-04-01 507 4f1a813b9 Christian Gromm 2019-04-01 508 static struct configfs_item_operations most_snd_grp_item_ops = { 4f1a813b9 Christian Gromm 2019-04-01 509 .release = most_snd_grp_release, 4f1a813b9 Christian Gromm 2019-04-01 510 }; 4f1a813b9 Christian Gromm 2019-04-01 511 4f1a813b9 Christian Gromm 2019-04-01 512 static struct configfs_group_operations most_snd_grp_group_ops = { 4f1a813b9 Christian Gromm 2019-04-01 513 .make_item = most_snd_grp_make_item, 4f1a813b9 Christian Gromm 2019-04-01 514 }; 4f1a813b9 Christian Gromm 2019-04-01 515 4f1a813b9 Christian Gromm 2019-04-01 516 static const struct config_item_type most_snd_grp_type = { 4f1a813b9 Christian Gromm 2019-04-01 517 .ct_item_ops = &most_snd_grp_item_ops, 4f1a813b9 Christian Gromm 2019-04-01 518 .ct_group_ops = &most_snd_grp_group_ops, 4f1a813b9 Christian Gromm 2019-04-01 519 .ct_attrs = most_snd_grp_attrs, 4f1a813b9 Christian Gromm 2019-04-01 520 .ct_owner = THIS_MODULE, 4f1a813b9 Christian Gromm 2019-04-01 521 }; 4f1a813b9 Christian Gromm 2019-04-01 522 4f1a813b9 Christian Gromm 2019-04-01 523 struct most_sound { 4f1a813b9 Christian Gromm 2019-04-01 524 struct configfs_subsystem subsys; 4f1a813b9 Christian Gromm 2019-04-01 525 struct list_head soundcard_list; 4f1a813b9 Christian Gromm 2019-04-01 526 }; 4f1a813b9 Christian Gromm 2019-04-01 527 4f1a813b9 Christian Gromm 2019-04-01 528 static struct config_group *most_sound_make_group(struct config_group *group, 4f1a813b9 Christian Gromm 2019-04-01 529 const char *name) 4f1a813b9 Christian Gromm 2019-04-01 530 { 4f1a813b9 Christian Gromm 2019-04-01 531 struct most_snd_grp *most; 4f1a813b9 Christian Gromm 2019-04-01 532 struct most_sound *ms = container_of(to_configfs_subsystem(group), 4f1a813b9 Christian Gromm 2019-04-01 533 struct most_sound, subsys); 4f1a813b9 Christian Gromm 2019-04-01 534 4f1a813b9 Christian Gromm 2019-04-01 535 list_for_each_entry(most, &ms->soundcard_list, list) { 4f1a813b9 Christian Gromm 2019-04-01 536 if (!most->create) { 4f1a813b9 Christian Gromm 2019-04-01 537 pr_info("adapter configuration still in progress.\n"); 4f1a813b9 Christian Gromm 2019-04-01 538 return ERR_PTR(-EPROTO); 4f1a813b9 Christian Gromm 2019-04-01 539 } 4f1a813b9 Christian Gromm 2019-04-01 540 } 4f1a813b9 Christian Gromm 2019-04-01 541 most = kzalloc(sizeof(*most), GFP_KERNEL); 4f1a813b9 Christian Gromm 2019-04-01 542 if (!most) 4f1a813b9 Christian Gromm 2019-04-01 543 return ERR_PTR(-ENOMEM); 4f1a813b9 Christian Gromm 2019-04-01 544 4f1a813b9 Christian Gromm 2019-04-01 @545 config_group_init_type_name(&most->group, name, &most_snd_grp_type); 4f1a813b9 Christian Gromm 2019-04-01 546 list_add_tail(&most->list, &ms->soundcard_list); 4f1a813b9 Christian Gromm 2019-04-01 547 return &most->group; 4f1a813b9 Christian Gromm 2019-04-01 548 } 4f1a813b9 Christian Gromm 2019-04-01 549 4f1a813b9 Christian Gromm 2019-04-01 550 static struct configfs_group_operations most_sound_group_ops = { 4f1a813b9 Christian Gromm 2019-04-01 551 .make_group = most_sound_make_group, 4f1a813b9 Christian Gromm 2019-04-01 552 }; 4f1a813b9 Christian Gromm 2019-04-01 553 4f1a813b9 Christian Gromm 2019-04-01 554 static const struct config_item_type most_sound_type = { 4f1a813b9 Christian Gromm 2019-04-01 555 .ct_group_ops = &most_sound_group_ops, 4f1a813b9 Christian Gromm 2019-04-01 556 .ct_owner = THIS_MODULE, 4f1a813b9 Christian Gromm 2019-04-01 557 }; 4f1a813b9 Christian Gromm 2019-04-01 558 4f1a813b9 Christian Gromm 2019-04-01 559 static struct most_sound most_sound_subsys = { 4f1a813b9 Christian Gromm 2019-04-01 560 .subsys = { 4f1a813b9 Christian Gromm 2019-04-01 561 .su_group = { 4f1a813b9 Christian Gromm 2019-04-01 562 .cg_item = { 4f1a813b9 Christian Gromm 2019-04-01 563 .ci_namebuf = "most_sound", 4f1a813b9 Christian Gromm 2019-04-01 564 .ci_type = &most_sound_type, 4f1a813b9 Christian Gromm 2019-04-01 565 }, 4f1a813b9 Christian Gromm 2019-04-01 566 }, 4f1a813b9 Christian Gromm 2019-04-01 567 }, 4f1a813b9 Christian Gromm 2019-04-01 568 }; 4f1a813b9 Christian Gromm 2019-04-01 569 4f1a813b9 Christian Gromm 2019-04-01 570 int most_register_configfs_subsys(struct core_component *c) 4f1a813b9 Christian Gromm 2019-04-01 571 { 4f1a813b9 Christian Gromm 2019-04-01 572 int ret; 4f1a813b9 Christian Gromm 2019-04-01 573 4f1a813b9 Christian Gromm 2019-04-01 574 if (!strcmp(c->name, "cdev")) 4f1a813b9 Christian Gromm 2019-04-01 575 ret = configfs_register_subsystem(&most_cdev_subsys); 4f1a813b9 Christian Gromm 2019-04-01 576 else if (!strcmp(c->name, "net")) 4f1a813b9 Christian Gromm 2019-04-01 577 ret = configfs_register_subsystem(&most_net_subsys); 4f1a813b9 Christian Gromm 2019-04-01 578 else if (!strcmp(c->name, "video")) 4f1a813b9 Christian Gromm 2019-04-01 579 ret = configfs_register_subsystem(&most_video_subsys); 4f1a813b9 Christian Gromm 2019-04-01 580 else if (!strcmp(c->name, "sound")) 4f1a813b9 Christian Gromm 2019-04-01 @581 ret = configfs_register_subsystem(&most_sound_subsys.subsys); 4f1a813b9 Christian Gromm 2019-04-01 582 else 4f1a813b9 Christian Gromm 2019-04-01 583 return -ENODEV; 4f1a813b9 Christian Gromm 2019-04-01 584 4f1a813b9 Christian Gromm 2019-04-01 585 if (ret) { 4f1a813b9 Christian Gromm 2019-04-01 586 pr_err("Error %d while registering subsystem %s\n", 4f1a813b9 Christian Gromm 2019-04-01 587 ret, c->name); 4f1a813b9 Christian Gromm 2019-04-01 588 } 4f1a813b9 Christian Gromm 2019-04-01 589 return ret; 4f1a813b9 Christian Gromm 2019-04-01 590 } 4f1a813b9 Christian Gromm 2019-04-01 591 EXPORT_SYMBOL_GPL(most_register_configfs_subsys); 4f1a813b9 Christian Gromm 2019-04-01 592 4f1a813b9 Christian Gromm 2019-04-01 593 void most_deregister_configfs_subsys(struct core_component *c) 4f1a813b9 Christian Gromm 2019-04-01 594 { 4f1a813b9 Christian Gromm 2019-04-01 595 if (!strcmp(c->name, "cdev")) 4f1a813b9 Christian Gromm 2019-04-01 596 configfs_unregister_subsystem(&most_cdev_subsys); 4f1a813b9 Christian Gromm 2019-04-01 597 else if (!strcmp(c->name, "net")) 4f1a813b9 Christian Gromm 2019-04-01 598 configfs_unregister_subsystem(&most_net_subsys); 4f1a813b9 Christian Gromm 2019-04-01 599 else if (!strcmp(c->name, "video")) 4f1a813b9 Christian Gromm 2019-04-01 600 configfs_unregister_subsystem(&most_video_subsys); 4f1a813b9 Christian Gromm 2019-04-01 601 else if (!strcmp(c->name, "sound")) 4f1a813b9 Christian Gromm 2019-04-01 @602 configfs_unregister_subsystem(&most_sound_subsys.subsys); 4f1a813b9 Christian Gromm 2019-04-01 603 } 4f1a813b9 Christian Gromm 2019-04-01 604 EXPORT_SYMBOL_GPL(most_deregister_configfs_subsys); 4f1a813b9 Christian Gromm 2019-04-01 605 4f1a813b9 Christian Gromm 2019-04-01 606 int __init configfs_init(void) 4f1a813b9 Christian Gromm 2019-04-01 607 { 4f1a813b9 Christian Gromm 2019-04-01 @608 config_group_init(&most_cdev_subsys.su_group); :::::: The code at line 462 was first introduced by commit :::::: 4f1a813b96301b0d622616e1666a9bd3ad5bbfe4 staging: most: add new file configfs.c :::::: TO: Christian Gromm <christian.gromm@xxxxxxxxxxxxx> :::::: CC: 0day robot <lkp@xxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel