linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rmk-arm:clearfog 8/9] drivers/pci/pcie/portdrv_core.c:330 pcie_port_device_register() warn: inconsistent indenting
@ 2022-06-25  9:15 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-06-25  9:15 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-kernel, Russell King (Oracle)

tree:   git://git.armlinux.org.uk/~rmk/linux-arm clearfog
head:   7fbb8b943f85ac20627571eb927cadfae176a4f7
commit: e86a7c1bfd62bfa0fb3c5319b651c192df44337d [8/9] mvebu/clearfog pcie updates
config: i386-randconfig-m021
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/pci/pcie/portdrv_core.c:330 pcie_port_device_register() warn: inconsistent indenting

Old smatch warnings:
drivers/pci/pcie/portdrv_core.c:343 pcie_port_device_register() warn: inconsistent indenting

vim +330 drivers/pci/pcie/portdrv_core.c

   310	
   311	/**
   312	 * pcie_port_device_register - register PCI Express port
   313	 * @dev: PCI Express port to register
   314	 *
   315	 * Allocate the port extension structure and register services associated with
   316	 * the port.
   317	 */
   318	int pcie_port_device_register(struct pci_dev *dev)
   319	{
   320		int status, capabilities, i, nr_service;
   321		int irqs[PCIE_PORT_DEVICE_MAXSERVICES];
   322	
   323		/* Enable PCI Express port device */
   324		status = pci_enable_device(dev);
   325		if (status)
   326			return status;
   327	
   328		/* Get and check PCI Express port services */
   329		capabilities = get_port_device_capability(dev);
 > 330	dev_info(&dev->dev, "PCIe capabilities: 0x%x\n", capabilities);
   331		if (!capabilities)
   332			return 0;
   333	
   334		pci_set_master(dev);
   335		/*
   336		 * Initialize service irqs. Don't use service devices that
   337		 * require interrupts if there is no way to generate them.
   338		 * However, some drivers may have a polling mode (e.g. pciehp_poll_mode)
   339		 * that can be used in the absence of irqs.  Allow them to determine
   340		 * if that is to be used.
   341		 */
   342		status = pcie_init_service_irqs(dev, irqs, capabilities);
   343	dev_info(&dev->dev, "init_service_irqs: %d\n", status);
   344		if (status) {
   345			capabilities &= PCIE_PORT_SERVICE_HP;
   346			if (!capabilities)
   347				goto error_disable;
   348		}
   349	
   350		/* Allocate child services if any */
   351		status = -ENODEV;
   352		nr_service = 0;
   353		for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) {
   354			int service = 1 << i;
   355			if (!(capabilities & service))
   356				continue;
   357			if (!pcie_device_init(dev, service, irqs[i]))
   358				nr_service++;
   359		}
   360		if (!nr_service)
   361			goto error_cleanup_irqs;
   362	
   363		return 0;
   364	
   365	error_cleanup_irqs:
   366		pci_free_irq_vectors(dev);
   367	error_disable:
   368		pci_disable_device(dev);
   369		return status;
   370	}
   371	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [rmk-arm:clearfog 8/9] drivers/pci/pcie/portdrv_core.c:330 pcie_port_device_register() warn: inconsistent indenting
@ 2022-08-04  5:56 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-08-04  5:56 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-kernel, Russell King (Oracle)

tree:   git://git.armlinux.org.uk/~rmk/linux-arm clearfog
head:   6df556f02478218e0aae7757ef1a7025569464d8
commit: 006166c0b29e4fde042ada6c2608ae4b41c1e9dc [8/9] mvebu/clearfog pcie updates
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220804/202208041347.FHCjyytU-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/pci/pcie/portdrv_core.c:330 pcie_port_device_register() warn: inconsistent indenting

Old smatch warnings:
drivers/pci/pcie/portdrv_core.c:343 pcie_port_device_register() warn: inconsistent indenting

vim +330 drivers/pci/pcie/portdrv_core.c

   310	
   311	/**
   312	 * pcie_port_device_register - register PCI Express port
   313	 * @dev: PCI Express port to register
   314	 *
   315	 * Allocate the port extension structure and register services associated with
   316	 * the port.
   317	 */
   318	int pcie_port_device_register(struct pci_dev *dev)
   319	{
   320		int status, capabilities, i, nr_service;
   321		int irqs[PCIE_PORT_DEVICE_MAXSERVICES];
   322	
   323		/* Enable PCI Express port device */
   324		status = pci_enable_device(dev);
   325		if (status)
   326			return status;
   327	
   328		/* Get and check PCI Express port services */
   329		capabilities = get_port_device_capability(dev);
 > 330	dev_info(&dev->dev, "PCIe capabilities: 0x%x\n", capabilities);
   331		if (!capabilities)
   332			return 0;
   333	
   334		pci_set_master(dev);
   335		/*
   336		 * Initialize service irqs. Don't use service devices that
   337		 * require interrupts if there is no way to generate them.
   338		 * However, some drivers may have a polling mode (e.g. pciehp_poll_mode)
   339		 * that can be used in the absence of irqs.  Allow them to determine
   340		 * if that is to be used.
   341		 */
   342		status = pcie_init_service_irqs(dev, irqs, capabilities);
   343	dev_info(&dev->dev, "init_service_irqs: %d\n", status);
   344		if (status) {
   345			capabilities &= PCIE_PORT_SERVICE_HP;
   346			if (!capabilities)
   347				goto error_disable;
   348		}
   349	
   350		/* Allocate child services if any */
   351		status = -ENODEV;
   352		nr_service = 0;
   353		for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) {
   354			int service = 1 << i;
   355			if (!(capabilities & service))
   356				continue;
   357			if (!pcie_device_init(dev, service, irqs[i]))
   358				nr_service++;
   359		}
   360		if (!nr_service)
   361			goto error_cleanup_irqs;
   362	
   363		return 0;
   364	
   365	error_cleanup_irqs:
   366		pci_free_irq_vectors(dev);
   367	error_disable:
   368		pci_disable_device(dev);
   369		return status;
   370	}
   371	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-04  5:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25  9:15 [rmk-arm:clearfog 8/9] drivers/pci/pcie/portdrv_core.c:330 pcie_port_device_register() warn: inconsistent indenting kernel test robot
2022-08-04  5:56 kernel test robot

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).