Re: [PATCH 4/6] usb: dwc3: qcom: Constify the software node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Heikki,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on next-20210125]
[cannot apply to balbi-usb/testing/next char-misc/char-misc-testing v5.11-rc6]
[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/Heikki-Krogerus/usb-Handle-device-properties-with-software-node-API/20210202-205900
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
        # https://github.com/0day-ci/linux/commit/ca804315a8e0060b2be65411c7d32cbf4396a030
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Heikki-Krogerus/usb-Handle-device-properties-with-software-node-API/20210202-205900
        git checkout ca804315a8e0060b2be65411c7d32cbf4396a030
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/usb/dwc3/dwc3-qcom.c: In function 'dwc3_qcom_acpi_register_core':
>> drivers/usb/dwc3/dwc3-qcom.c:620:51: error: incompatible type for argument 2 of 'device_add_software_node'
     620 |  ret = device_add_software_node(&qcom->dwc3->dev, dwc3_qcom_swnode);
         |                                                   ^~~~~~~~~~~~~~~~
         |                                                   |
         |                                                   const struct software_node
   In file included from include/linux/of.h:22,
                    from include/linux/irqdomain.h:35,
                    from include/linux/acpi.h:13,
                    from drivers/usb/dwc3/dwc3-qcom.c:7:
   include/linux/property.h:491:78: note: expected 'const struct software_node *' but argument is of type 'const struct software_node'
     491 | int device_add_software_node(struct device *dev, const struct software_node *swnode);
         |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~


vim +/device_add_software_node +620 drivers/usb/dwc3/dwc3-qcom.c

   573	
   574	static int dwc3_qcom_acpi_register_core(struct platform_device *pdev)
   575	{
   576		struct dwc3_qcom	*qcom = platform_get_drvdata(pdev);
   577		struct device		*dev = &pdev->dev;
   578		struct resource		*res, *child_res = NULL;
   579		struct platform_device	*pdev_irq = qcom->urs_usb ? qcom->urs_usb :
   580								    pdev;
   581		int			irq;
   582		int			ret;
   583	
   584		qcom->dwc3 = platform_device_alloc("dwc3", PLATFORM_DEVID_AUTO);
   585		if (!qcom->dwc3)
   586			return -ENOMEM;
   587	
   588		qcom->dwc3->dev.parent = dev;
   589		qcom->dwc3->dev.type = dev->type;
   590		qcom->dwc3->dev.dma_mask = dev->dma_mask;
   591		qcom->dwc3->dev.dma_parms = dev->dma_parms;
   592		qcom->dwc3->dev.coherent_dma_mask = dev->coherent_dma_mask;
   593	
   594		child_res = kcalloc(2, sizeof(*child_res), GFP_KERNEL);
   595		if (!child_res)
   596			return -ENOMEM;
   597	
   598		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   599		if (!res) {
   600			dev_err(&pdev->dev, "failed to get memory resource\n");
   601			ret = -ENODEV;
   602			goto out;
   603		}
   604	
   605		child_res[0].flags = res->flags;
   606		child_res[0].start = res->start;
   607		child_res[0].end = child_res[0].start +
   608			qcom->acpi_pdata->dwc3_core_base_size;
   609	
   610		irq = platform_get_irq(pdev_irq, 0);
   611		child_res[1].flags = IORESOURCE_IRQ;
   612		child_res[1].start = child_res[1].end = irq;
   613	
   614		ret = platform_device_add_resources(qcom->dwc3, child_res, 2);
   615		if (ret) {
   616			dev_err(&pdev->dev, "failed to add resources\n");
   617			goto out;
   618		}
   619	
 > 620		ret = device_add_software_node(&qcom->dwc3->dev, dwc3_qcom_swnode);
   621		if (ret < 0) {
   622			dev_err(&pdev->dev, "failed to add properties\n");
   623			goto out;
   624		}
   625	
   626		ret = platform_device_add(qcom->dwc3);
   627		if (ret) {
   628			dev_err(&pdev->dev, "failed to add device\n");
   629			device_remove_software_node(&qcom->dwc3->dev);
   630		}
   631	
   632	out:
   633		kfree(child_res);
   634		return ret;
   635	}
   636	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux