Content-Type: multipart/mixed; boundary="===============8068711209398698561==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 1/2] media: cec: add SECO MEC-based cec driver Date: Wed, 02 Feb 2022 22:31:18 +0800 Message-ID: <202202022216.MCt6c52g-lkp@intel.com> In-Reply-To: <20220201183734.224756-2-ek5.chimenti@gmail.com> List-Id: --===============8068711209398698561== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi ektor5, I love your patch! Perhaps something to improve: [auto build test WARNING on media-tree/master] [also build test WARNING on linux/master linus/master v5.17-rc2 next-202202= 02] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/ektor5/Add-SECO-CEC-driver= -for-MEC-Based-boards/20220202-023834 base: git://linuxtv.org/media_tree.git master config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/202202= 02/202202022216.MCt6c52g-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6b1e84= 4b69f15bb7dffaf9365cd2b355d2eb7579) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/8960cb39808a004dee84a2f95= 5ed949b1a4da7a8 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review ektor5/Add-SECO-CEC-driver-for-MEC= -Based-boards/20220202-023834 git checkout 8960cb39808a004dee84a2f955ed949b1a4da7a8 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash drivers/media/cec/platform/= seco/ drivers/net/wireless/ath/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/media/cec/platform/seco/seco-meccec.c:735:8: warning: variable '= adaps' is uninitialized when used here [-Wuninitialized] if (adaps--) ^~~~~ drivers/media/cec/platform/seco/seco-meccec.c:634:11: note: initialize t= he variable 'adaps' to silence this warning int adaps, notifs =3D 0; ^ =3D 0 1 warning generated. vim +/adaps +735 drivers/media/cec/platform/seco/seco-meccec.c 626 = 627 static int seco_meccec_probe(struct platform_device *pdev) 628 { 629 struct seco_meccec_data *meccec; 630 struct device *dev =3D &pdev->dev; 631 struct device *hdmi_dev; 632 const char * const *conn; 633 int ret, idx; 634 int adaps, notifs =3D 0; 635 = 636 meccec =3D devm_kzalloc(dev, sizeof(*meccec), GFP_KERNEL); 637 if (!meccec) 638 return -ENOMEM; 639 = 640 dev_set_drvdata(dev, meccec); 641 = 642 meccec->pdev =3D pdev; 643 meccec->dev =3D dev; 644 = 645 ret =3D ec_get_version(meccec); 646 if (ret) { 647 dev_err(dev, "Get version failed\n"); 648 goto err; 649 } 650 = 651 if (!has_acpi_companion(dev)) { 652 dev_err(dev, "Cannot find any ACPI companion\n"); 653 ret =3D -ENODEV; 654 goto err; 655 } 656 = 657 ret =3D seco_meccec_acpi_probe(meccec); 658 if (ret) { 659 dev_err(dev, "ACPI probe failed\n"); 660 goto err; 661 } 662 = 663 ret =3D devm_request_threaded_irq(dev, 664 meccec->irq, 665 NULL, 666 seco_meccec_irq_handler, 667 IRQF_TRIGGER_RISING | IRQF_ONESHOT, 668 dev_name(&pdev->dev), meccec); 669 = 670 if (ret) { 671 dev_err(dev, "Cannot request IRQ %d\n", meccec->irq); 672 ret =3D -EIO; 673 goto err; 674 } 675 = 676 hdmi_dev =3D seco_meccec_find_hdmi_dev(&pdev->dev, &conn); 677 if (IS_ERR(hdmi_dev)) { 678 dev_err(dev, "Cannot find HDMI Device\n"); 679 return PTR_ERR(hdmi_dev); 680 } 681 dev_dbg(dev, "HDMI device found\n"); 682 = 683 for (idx =3D 0; idx < MECCEC_MAX_CEC_ADAP; idx++) { 684 if (meccec->channels & BIT_MASK(idx)) { 685 ret =3D meccec_create_adapter(meccec, idx); 686 if (ret) 687 goto err_delete_adapter; 688 dev_dbg(dev, "CEC adapter #%d allocated\n", idx); 689 } 690 } 691 = 692 for (idx =3D 0; idx < MECCEC_MAX_CEC_ADAP; idx++) { 693 if (meccec->channels & BIT_MASK(idx)) { 694 struct cec_adapter *acec =3D meccec->cec_adap[idx]; 695 struct cec_notifier *ncec; 696 = 697 if (!acec) { 698 ret =3D -EINVAL; 699 goto err_notifier; 700 } 701 = 702 ncec =3D cec_notifier_cec_adap_register(hdmi_dev, 703 conn[idx], acec); 704 = 705 dev_dbg(dev, "CEC notifier #%d allocated %s\n", idx, conn[idx]); 706 = 707 if (IS_ERR(ncec)) { 708 ret =3D PTR_ERR(ncec); 709 goto err_notifier; 710 } 711 = 712 meccec->notifier[idx] =3D ncec; 713 notifs++; 714 } 715 } 716 = 717 for (idx =3D 0; idx < MECCEC_MAX_CEC_ADAP; idx++) { 718 if (meccec->channels & BIT_MASK(idx)) { 719 ret =3D cec_register_adapter(meccec->cec_adap[idx], dev); 720 if (ret) 721 goto err_notifier; 722 = 723 dev_dbg(dev, "CEC adapter #%d registered\n", idx); 724 } 725 } 726 = 727 platform_set_drvdata(pdev, meccec); 728 dev_dbg(dev, "Device registered\n"); 729 = 730 return ret; 731 = 732 err_notifier: 733 for (idx =3D 0; idx < MECCEC_MAX_CEC_ADAP; idx++) { 734 if (meccec->channels & BIT_MASK(idx)) { > 735 if (adaps--) 736 return ret; 737 = 738 cec_notifier_cec_adap_unregister(meccec->notifier[idx], 739 meccec->cec_adap[idx]); 740 } 741 } 742 err_delete_adapter: 743 for (idx =3D 0; idx < MECCEC_MAX_CEC_ADAP; idx++) { 744 if (meccec->channels & BIT_MASK(idx)) { 745 if (notifs--) 746 return ret; 747 = 748 cec_delete_adapter(meccec->cec_adap[idx]); 749 } 750 } 751 err: 752 dev_err(dev, "%s device probe failed: %d\n", dev_name(dev), ret); 753 = 754 return ret; 755 } 756 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8068711209398698561==--