tree: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git master head: d0b776f71c2b20cab9b508d153d78246d68f57d2 commit: 6c117bc7f396863bc48b5a420bea4ffd7eb5584c [38/41] Merge branch 'gmsl/for-renesas-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar into renesas-drivers config: riscv-allmodconfig (attached as .config) compiler: riscv64-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 6c117bc7f396863bc48b5a420bea4ffd7eb5584c # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=riscv If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): drivers/media/usb/au0828/au0828-core.c: In function 'au0828_disable_source': >> drivers/media/usb/au0828/au0828-core.c:514:29: error: passing argument 1 of '__media_pipeline_stop' from incompatible pointer type [-Werror=incompatible-pointer-types] __media_pipeline_stop(dev->active_link_owner); ~~~^~~~~~~~~~~~~~~~~~~ In file included from include/media/media-device.h:26, from include/media/media-request.h:20, from include/media/videobuf2-core.h:20, from include/media/videobuf2-v4l2.h:16, from drivers/media/usb/au0828/au0828.h:28, from drivers/media/usb/au0828/au0828-core.c:18: include/media/media-entity.h:1040:46: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *' void __media_pipeline_stop(struct media_pad *pad); ~~~~~~~~~~~~~~~~~~^~~ >> drivers/media/usb/au0828/au0828-core.c:519:9: error: passing argument 1 of '__media_pipeline_start' from incompatible pointer type [-Werror=incompatible-pointer-types] dev->active_link_user, ~~~^~~~~~~~~~~~~~~~~~ In file included from include/media/media-device.h:26, from include/media/media-request.h:20, from include/media/videobuf2-core.h:20, from include/media/videobuf2-v4l2.h:16, from drivers/media/usb/au0828/au0828.h:28, from drivers/media/usb/au0828/au0828-core.c:18: include/media/media-entity.h:1016:59: note: expected 'struct media_pad *' but argument is of type 'struct media_entity *' __must_check int __media_pipeline_start(struct media_pad *pad, ~~~~~~~~~~~~~~~~~~^~~ cc1: some warnings being treated as errors vim +/__media_pipeline_stop +514 drivers/media/usb/au0828/au0828-core.c c94903f1 Shuah Khan 2016-02-11 450 90cd366b Shuah Khan 2016-11-29 451 /* Callers should hold graph_mutex */ c94903f1 Shuah Khan 2016-02-11 452 static void au0828_disable_source(struct media_entity *entity) c94903f1 Shuah Khan 2016-02-11 453 { c94903f1 Shuah Khan 2016-02-11 454 int ret = 0; c94903f1 Shuah Khan 2016-02-11 455 struct media_device *mdev = entity->graph_obj.mdev; c94903f1 Shuah Khan 2016-02-11 456 struct au0828_dev *dev; c94903f1 Shuah Khan 2016-02-11 457 c94903f1 Shuah Khan 2016-02-11 458 if (!mdev) c94903f1 Shuah Khan 2016-02-11 459 return; c94903f1 Shuah Khan 2016-02-11 460 c94903f1 Shuah Khan 2016-02-11 461 dev = mdev->source_priv; c94903f1 Shuah Khan 2016-02-11 462 90cd366b Shuah Khan 2016-11-29 463 if (!dev->active_link) 90cd366b Shuah Khan 2016-11-29 464 return; c94903f1 Shuah Khan 2016-02-11 465 383b0e5b Shuah Khan 2019-04-01 466 /* link is active - stop pipeline from source 383b0e5b Shuah Khan 2019-04-01 467 * (tuner/s-video/Composite) to the entity 383b0e5b Shuah Khan 2019-04-01 468 * When DVB/s-video/Composite owns tuner, it won't be in 383b0e5b Shuah Khan 2019-04-01 469 * shared state. 383b0e5b Shuah Khan 2019-04-01 470 */ c94903f1 Shuah Khan 2016-02-11 471 if (dev->active_link->sink->entity == dev->active_sink && c94903f1 Shuah Khan 2016-02-11 472 dev->active_link->source->entity == dev->active_source) { c94903f1 Shuah Khan 2016-02-11 473 /* 383b0e5b Shuah Khan 2019-04-01 474 * Prevent video from deactivating link when audio 383b0e5b Shuah Khan 2019-04-01 475 * has active pipeline and vice versa. In addition 383b0e5b Shuah Khan 2019-04-01 476 * handle the case when more than one video/vbi 383b0e5b Shuah Khan 2019-04-01 477 * application is sharing the link. c94903f1 Shuah Khan 2016-02-11 478 */ 383b0e5b Shuah Khan 2019-04-01 479 bool owner_is_audio = false; 383b0e5b Shuah Khan 2019-04-01 480 383b0e5b Shuah Khan 2019-04-01 481 if (dev->active_link_owner->function == 383b0e5b Shuah Khan 2019-04-01 482 MEDIA_ENT_F_AUDIO_CAPTURE) 383b0e5b Shuah Khan 2019-04-01 483 owner_is_audio = true; 383b0e5b Shuah Khan 2019-04-01 484 383b0e5b Shuah Khan 2019-04-01 485 if (dev->active_link_shared) { 383b0e5b Shuah Khan 2019-04-01 486 pr_debug("Shared link owner %s user %s %d\n", 383b0e5b Shuah Khan 2019-04-01 487 dev->active_link_owner->name, 383b0e5b Shuah Khan 2019-04-01 488 entity->name, dev->users); 383b0e5b Shuah Khan 2019-04-01 489 383b0e5b Shuah Khan 2019-04-01 490 /* Handle video device users > 1 383b0e5b Shuah Khan 2019-04-01 491 * When audio owns the shared link with 383b0e5b Shuah Khan 2019-04-01 492 * more than one video users, avoid 383b0e5b Shuah Khan 2019-04-01 493 * disabling the source and/or switching 383b0e5b Shuah Khan 2019-04-01 494 * the owner until the last disable_source 383b0e5b Shuah Khan 2019-04-01 495 * call from video _close(). Use dev->users to 383b0e5b Shuah Khan 2019-04-01 496 * determine when to switch/disable. 383b0e5b Shuah Khan 2019-04-01 497 */ 383b0e5b Shuah Khan 2019-04-01 498 if (dev->active_link_owner != entity) { 383b0e5b Shuah Khan 2019-04-01 499 /* video device has users > 1 */ 383b0e5b Shuah Khan 2019-04-01 500 if (owner_is_audio && dev->users > 1) 383b0e5b Shuah Khan 2019-04-01 501 return; 383b0e5b Shuah Khan 2019-04-01 502 383b0e5b Shuah Khan 2019-04-01 503 dev->active_link_user = NULL; 383b0e5b Shuah Khan 2019-04-01 504 dev->active_link_user_pipe = NULL; 383b0e5b Shuah Khan 2019-04-01 505 dev->active_link_shared = false; 383b0e5b Shuah Khan 2019-04-01 506 return; 383b0e5b Shuah Khan 2019-04-01 507 } 383b0e5b Shuah Khan 2019-04-01 508 383b0e5b Shuah Khan 2019-04-01 509 /* video owns the link and has users > 1 */ 383b0e5b Shuah Khan 2019-04-01 510 if (!owner_is_audio && dev->users > 1) 383b0e5b Shuah Khan 2019-04-01 511 return; 383b0e5b Shuah Khan 2019-04-01 512 383b0e5b Shuah Khan 2019-04-01 513 /* stop pipeline */ 383b0e5b Shuah Khan 2019-04-01 @514 __media_pipeline_stop(dev->active_link_owner); 383b0e5b Shuah Khan 2019-04-01 515 pr_debug("Pipeline stop for %s\n", 383b0e5b Shuah Khan 2019-04-01 516 dev->active_link_owner->name); 383b0e5b Shuah Khan 2019-04-01 517 383b0e5b Shuah Khan 2019-04-01 518 ret = __media_pipeline_start( 383b0e5b Shuah Khan 2019-04-01 @519 dev->active_link_user, 383b0e5b Shuah Khan 2019-04-01 520 dev->active_link_user_pipe); 383b0e5b Shuah Khan 2019-04-01 521 if (ret) { 383b0e5b Shuah Khan 2019-04-01 522 pr_err("Start Pipeline: %s->%s %d\n", 383b0e5b Shuah Khan 2019-04-01 523 dev->active_source->name, 383b0e5b Shuah Khan 2019-04-01 524 dev->active_link_user->name, 383b0e5b Shuah Khan 2019-04-01 525 ret); 383b0e5b Shuah Khan 2019-04-01 526 goto deactivate_link; 383b0e5b Shuah Khan 2019-04-01 527 } 383b0e5b Shuah Khan 2019-04-01 528 /* link user is now the owner */ 383b0e5b Shuah Khan 2019-04-01 529 dev->active_link_owner = dev->active_link_user; 383b0e5b Shuah Khan 2019-04-01 530 dev->active_link_user = NULL; 383b0e5b Shuah Khan 2019-04-01 531 dev->active_link_user_pipe = NULL; 383b0e5b Shuah Khan 2019-04-01 532 dev->active_link_shared = false; 383b0e5b Shuah Khan 2019-04-01 533 383b0e5b Shuah Khan 2019-04-01 534 pr_debug("Pipeline started for %s\n", 383b0e5b Shuah Khan 2019-04-01 535 dev->active_link_owner->name); 383b0e5b Shuah Khan 2019-04-01 536 return; 383b0e5b Shuah Khan 2019-04-01 537 } else if (!owner_is_audio && dev->users > 1) 383b0e5b Shuah Khan 2019-04-01 538 /* video/vbi owns the link and has users > 1 */ 383b0e5b Shuah Khan 2019-04-01 539 return; 383b0e5b Shuah Khan 2019-04-01 540 c94903f1 Shuah Khan 2016-02-11 541 if (dev->active_link_owner != entity) 90cd366b Shuah Khan 2016-11-29 542 return; 383b0e5b Shuah Khan 2019-04-01 543 383b0e5b Shuah Khan 2019-04-01 544 /* stop pipeline */ 6c117bc7 Geert Uytterhoeven 2019-04-30 545 __media_pipeline_stop(dev->active_link_owner->pads); 383b0e5b Shuah Khan 2019-04-01 546 pr_debug("Pipeline stop for %s\n", 383b0e5b Shuah Khan 2019-04-01 547 dev->active_link_owner->name); 383b0e5b Shuah Khan 2019-04-01 548 383b0e5b Shuah Khan 2019-04-01 549 deactivate_link: c94903f1 Shuah Khan 2016-02-11 550 ret = __media_entity_setup_link(dev->active_link, 0); c94903f1 Shuah Khan 2016-02-11 551 if (ret) c94903f1 Shuah Khan 2016-02-11 552 pr_err("Deactivate link Error %d\n", ret); c94903f1 Shuah Khan 2016-02-11 553 383b0e5b Shuah Khan 2019-04-01 554 pr_info("Disabled Source: %s->%s->%s Ret %d\n", c94903f1 Shuah Khan 2016-02-11 555 dev->active_source->name, dev->active_sink->name, c94903f1 Shuah Khan 2016-02-11 556 dev->active_link_owner->name, ret); c94903f1 Shuah Khan 2016-02-11 557 c94903f1 Shuah Khan 2016-02-11 558 dev->active_link = NULL; c94903f1 Shuah Khan 2016-02-11 559 dev->active_link_owner = NULL; c94903f1 Shuah Khan 2016-02-11 560 dev->active_source = NULL; c94903f1 Shuah Khan 2016-02-11 561 dev->active_sink = NULL; 383b0e5b Shuah Khan 2019-04-01 562 dev->active_link_shared = false; 383b0e5b Shuah Khan 2019-04-01 563 dev->active_link_user = NULL; c94903f1 Shuah Khan 2016-02-11 564 } c94903f1 Shuah Khan 2016-02-11 565 } 0a82edd0 Arnd Bergmann 2016-03-04 566 #endif c94903f1 Shuah Khan 2016-02-11 567 :::::: The code at line 514 was first introduced by commit :::::: 383b0e5b6ebb087bde22fbb5fcd9d567c5dbdb92 media: au0828: fix enable and disable source audio and video inconsistencies :::::: TO: Shuah Khan :::::: CC: Mauro Carvalho Chehab --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation