linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Sujeev Dias <sdias@codeaurora.org>
Cc: kbuild-all@01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Sujeev Dias <sdias@codeaurora.org>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Tony Truong <truong@codeaurora.org>
Subject: Re: [PATCH v1 2/4] mhi_bus: controller: MHI support for QCOM modems
Date: Sat, 28 Apr 2018 11:12:41 +0800	[thread overview]
Message-ID: <201804281044.CzuyqYbe%fengguang.wu@intel.com> (raw)
In-Reply-To: <1524795811-21399-3-git-send-email-sdias@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 8141 bytes --]

Hi Sujeev,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc2 next-20180426]
[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/Sujeev-Dias/mhi_bus-core-Add-support-for-MHI-host-interface/20180428-065959
config: openrisc-allmodconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   In file included from drivers/bus/mhi/controllers/mhi_qcom.c:25:0:
   include/linux/mhi.h:658:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    static inlint int mhi_force_rddm_mode(struct mhi_controller *mhi_cntrl)
                  ^~~
   drivers/bus/mhi/controllers/mhi_qcom.c: In function 'mhi_deinit_pci_dev':
>> drivers/bus/mhi/controllers/mhi_qcom.c:46:2: error: implicit declaration of function 'pci_free_irq_vectors' [-Werror=implicit-function-declaration]
     pci_free_irq_vectors(pci_dev);
     ^~~~~~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:51:2: error: implicit declaration of function 'pci_clear_master' [-Werror=implicit-function-declaration]
     pci_clear_master(pci_dev);
     ^~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:52:2: error: implicit declaration of function 'pci_release_region' [-Werror=implicit-function-declaration]
     pci_release_region(pci_dev, mhi_dev->resn);
     ^~~~~~~~~~~~~~~~~~
   drivers/bus/mhi/controllers/mhi_qcom.c: In function 'mhi_init_pci_dev':
>> drivers/bus/mhi/controllers/mhi_qcom.c:77:8: error: implicit declaration of function 'pci_request_region' [-Werror=implicit-function-declaration]
     ret = pci_request_region(pci_dev, mhi_dev->resn, "mhi");
           ^~~~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:93:8: error: implicit declaration of function 'pci_alloc_irq_vectors' [-Werror=implicit-function-declaration]
     ret = pci_alloc_irq_vectors(pci_dev, mhi_cntrl->msi_required,
           ^~~~~~~~~~~~~~~~~~~~~
>> drivers/bus/mhi/controllers/mhi_qcom.c:94:34: error: 'PCI_IRQ_MSI' undeclared (first use in this function)
            mhi_cntrl->msi_required, PCI_IRQ_MSI);
                                     ^~~~~~~~~~~
   drivers/bus/mhi/controllers/mhi_qcom.c:94:34: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/bus/mhi/controllers/mhi_qcom.c:109:23: error: implicit declaration of function 'pci_irq_vector' [-Werror=implicit-function-declaration]
      mhi_cntrl->irq[i] = pci_irq_vector(pci_dev, i);
                          ^~~~~~~~~~~~~~
   At top level:
   drivers/bus/mhi/controllers/mhi_qcom.c:238:12: warning: 'mhi_system_resume' defined but not used [-Wunused-function]
    static int mhi_system_resume(struct device *dev)
               ^~~~~~~~~~~~~~~~~
   drivers/bus/mhi/controllers/mhi_qcom.c:186:12: warning: 'mhi_runtime_idle' defined but not used [-Wunused-function]
    static int mhi_runtime_idle(struct device *dev)
               ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/pci_free_irq_vectors +46 drivers/bus/mhi/controllers/mhi_qcom.c

  > 25	#include <linux/mhi.h>
    26	#include "mhi_qcom.h"
    27	
    28	static struct pci_device_id mhi_pcie_device_id[] = {
    29		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0300)},
    30		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0301)},
    31		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0302)},
    32		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0303)},
    33		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0304)},
    34		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, 0x0305)},
    35		{PCI_DEVICE(MHI_PCIE_VENDOR_ID, MHI_PCIE_DEBUG_ID)},
    36		{0},
    37	};
    38	
    39	static struct pci_driver mhi_pcie_driver;
    40	
    41	void mhi_deinit_pci_dev(struct mhi_controller *mhi_cntrl)
    42	{
    43		struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
    44		struct pci_dev *pci_dev = mhi_dev->pci_dev;
    45	
  > 46		pci_free_irq_vectors(pci_dev);
    47		kfree(mhi_cntrl->irq);
    48		mhi_cntrl->irq = NULL;
    49		iounmap(mhi_cntrl->regs);
    50		mhi_cntrl->regs = NULL;
  > 51		pci_clear_master(pci_dev);
  > 52		pci_release_region(pci_dev, mhi_dev->resn);
    53		pci_disable_device(pci_dev);
    54	}
    55	
    56	static int mhi_init_pci_dev(struct mhi_controller *mhi_cntrl)
    57	{
    58		struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
    59		struct pci_dev *pci_dev = mhi_dev->pci_dev;
    60		int ret;
    61		resource_size_t start, len;
    62		int i;
    63	
    64		mhi_dev->resn = MHI_PCI_BAR_NUM;
    65		ret = pci_assign_resource(pci_dev, mhi_dev->resn);
    66		if (ret) {
    67			MHI_ERR("Error assign pci resources, ret:%d\n", ret);
    68			return ret;
    69		}
    70	
    71		ret = pci_enable_device(pci_dev);
    72		if (ret) {
    73			MHI_ERR("Error enabling device, ret:%d\n", ret);
    74			goto error_enable_device;
    75		}
    76	
  > 77		ret = pci_request_region(pci_dev, mhi_dev->resn, "mhi");
    78		if (ret) {
    79			MHI_ERR("Error pci_request_region, ret:%d\n", ret);
    80			goto error_request_region;
    81		}
    82	
    83		pci_set_master(pci_dev);
    84	
    85		start = pci_resource_start(pci_dev, mhi_dev->resn);
    86		len = pci_resource_len(pci_dev, mhi_dev->resn);
    87		mhi_cntrl->regs = ioremap_nocache(start, len);
    88		if (!mhi_cntrl->regs) {
    89			MHI_ERR("Error ioremap region\n");
    90			goto error_ioremap;
    91		}
    92	
  > 93		ret = pci_alloc_irq_vectors(pci_dev, mhi_cntrl->msi_required,
  > 94					    mhi_cntrl->msi_required, PCI_IRQ_MSI);
    95		if (IS_ERR_VALUE((ulong)ret) || ret < mhi_cntrl->msi_required) {
    96			MHI_ERR("Failed to enable MSI, ret:%d\n", ret);
    97			goto error_req_msi;
    98		}
    99	
   100		mhi_cntrl->msi_allocated = ret;
   101		mhi_cntrl->irq = kmalloc_array(mhi_cntrl->msi_allocated,
   102					       sizeof(*mhi_cntrl->irq), GFP_KERNEL);
   103		if (!mhi_cntrl->irq) {
   104			ret = -ENOMEM;
   105			goto error_alloc_msi_vec;
   106		}
   107	
   108		for (i = 0; i < mhi_cntrl->msi_allocated; i++) {
 > 109			mhi_cntrl->irq[i] = pci_irq_vector(pci_dev, i);
   110			if (mhi_cntrl->irq[i] < 0) {
   111				ret = mhi_cntrl->irq[i];
   112				goto error_get_irq_vec;
   113			}
   114		}
   115	
   116		dev_set_drvdata(&pci_dev->dev, mhi_cntrl);
   117	
   118		/* configure runtime pm */
   119		pm_runtime_set_autosuspend_delay(&pci_dev->dev, MHI_RPM_SUSPEND_TMR_MS);
   120		pm_runtime_use_autosuspend(&pci_dev->dev);
   121		pm_suspend_ignore_children(&pci_dev->dev, true);
   122	
   123		/*
   124		 * pci framework will increment usage count (twice) before
   125		 * calling local device driver probe function.
   126		 * 1st pci.c pci_pm_init() calls pm_runtime_forbid
   127		 * 2nd pci-driver.c local_pci_probe calls pm_runtime_get_sync
   128		 * Framework expect pci device driver to call
   129		 * pm_runtime_put_noidle to decrement usage count after
   130		 * successful probe and and call pm_runtime_allow to enable
   131		 * runtime suspend.
   132		 */
   133		pm_runtime_mark_last_busy(&pci_dev->dev);
   134		pm_runtime_put_noidle(&pci_dev->dev);
   135	
   136		return 0;
   137	
   138	error_get_irq_vec:
   139		kfree(mhi_cntrl->irq);
   140		mhi_cntrl->irq = NULL;
   141	
   142	error_alloc_msi_vec:
   143		pci_free_irq_vectors(pci_dev);
   144	
   145	error_req_msi:
   146		iounmap(mhi_cntrl->regs);
   147	
   148	error_ioremap:
   149		pci_clear_master(pci_dev);
   150	
   151	error_request_region:
   152		pci_disable_device(pci_dev);
   153	
   154	error_enable_device:
   155		pci_release_region(pci_dev, mhi_dev->resn);
   156	
   157		return ret;
   158	}
   159	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 44455 bytes --]

  parent reply	other threads:[~2018-04-28  3:13 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27  2:23 MHI initial design review Sujeev Dias
2018-04-27  2:23 ` [PATCH v1 1/4] mhi_bus: core: Add support for MHI host interface Sujeev Dias
2018-04-27  7:22   ` Greg Kroah-Hartman
2018-04-28 14:28     ` Sujeev Dias
2018-04-28 15:50       ` Greg Kroah-Hartman
2018-04-27  7:23   ` Greg Kroah-Hartman
2018-04-27 12:18   ` Arnd Bergmann
2018-04-28 16:08     ` Sujeev Dias
2018-04-28  0:28   ` kbuild test robot
2018-04-28  2:52   ` kbuild test robot
2018-05-03 19:21   ` Pavel Machek
2018-05-04  3:05     ` Sujeev Dias
2018-06-22 23:03   ` Randy Dunlap
2018-04-27  2:23 ` [PATCH v1 2/4] mhi_bus: controller: MHI support for QCOM modems Sujeev Dias
2018-04-27 11:32   ` Arnd Bergmann
2018-04-28 15:40     ` Sujeev Dias
2018-04-28  3:05   ` kbuild test robot
2018-04-28  3:12   ` kbuild test robot [this message]
2018-04-27  2:23 ` [PATCH v1 3/4] mhi_bus: dev: netdev: add network interface driver Sujeev Dias
2018-04-27 11:19   ` Arnd Bergmann
2018-04-28 15:25     ` Sujeev Dias
2018-04-27  2:23 ` [PATCH v1 4/4] mhi_bus: dev: uci: add user space " Sujeev Dias
2018-04-27 11:36   ` Arnd Bergmann
2018-04-28  1:03   ` kbuild test robot
2018-04-28  5:16   ` [PATCH] mhi_bus: dev: uci: fix semicolon.cocci warnings kbuild test robot
2018-04-28  5:16   ` [PATCH v1 4/4] mhi_bus: dev: uci: add user space interface driver kbuild test robot
2018-07-09 20:08 ` MHI code review Sujeev Dias
2018-07-09 20:08   ` [PATCH v2 1/7] mhi_bus: core: initial checkin for modem host interface bus driver Sujeev Dias
2018-07-09 20:50     ` Greg Kroah-Hartman
2018-07-09 20:52     ` Greg Kroah-Hartman
2018-07-10  6:36     ` Greg Kroah-Hartman
2018-07-11 19:30     ` Rob Herring
2018-08-09 18:39     ` Randy Dunlap
2018-07-09 20:08   ` [PATCH v2 2/7] mhi_bus: core: add power management support Sujeev Dias
2018-07-09 20:08   ` [PATCH v2 3/7] mhi_bus: core: add support for data transfer Sujeev Dias
2018-07-10  6:29     ` Greg Kroah-Hartman
2018-07-09 20:08   ` [PATCH v2 4/7] mhi_bus: core: add support for handling ioctl cmds Sujeev Dias
2018-07-09 20:08   ` [PATCH v2 5/7] mhi_bus: core: add support to get external modem time Sujeev Dias
2018-07-11 19:32     ` Rob Herring
2018-08-09 20:17     ` Randy Dunlap
2018-07-09 20:08   ` [PATCH v2 6/7] mhi_bus: controller: MHI support for QCOM modems Sujeev Dias
2018-07-11 19:36     ` Rob Herring
2018-07-09 20:08   ` [PATCH v2 7/7] mhi_bus: dev: uci: add user space interface driver Sujeev Dias
2019-04-30 15:10   ` MHI code review Daniele Palmas
2019-06-12 17:54     ` Sujeev Dias
2019-06-12 20:58       ` Daniele Palmas
2019-06-12 18:00     ` Sujeev Dias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201804281044.CzuyqYbe%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdias@codeaurora.org \
    --cc=truong@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).