]> Git Repo - linux.git/commitdiff
Merge branch 'pci/doc'
authorBjorn Helgaas <[email protected]>
Wed, 5 Aug 2020 23:24:22 +0000 (18:24 -0500)
committerBjorn Helgaas <[email protected]>
Wed, 5 Aug 2020 23:24:22 +0000 (18:24 -0500)
- Fix several kerneldoc warnings (Krzysztof Kozlowski)

* pci/doc:
  PCI: Fix kerneldoc warnings

1  2 
drivers/pci/ats.c
drivers/pci/of.c
drivers/pci/setup-bus.c

diff --combined drivers/pci/ats.c
index 647e097530a89ddf4105ea8761750155b9232b81,2e107305250936b7cb0b240b9f71db645c1fbfe5..0d3719407b8b9ee9b96db8fde253980c9cad6c13
@@@ -188,7 -188,8 +188,8 @@@ void pci_pri_init(struct pci_dev *pdev
  
  /**
   * pci_enable_pri - Enable PRI capability
-  * @ pdev: PCI device structure
+  * @pdev: PCI device structure
+  * @reqs: outstanding requests
   *
   * Returns 0 on success, negative value on error
   */
@@@ -325,21 -326,6 +326,21 @@@ int pci_prg_resp_pasid_required(struct 
  
        return pdev->pasid_required;
  }
 +
 +/**
 + * pci_pri_supported - Check if PRI is supported.
 + * @pdev: PCI device structure
 + *
 + * Returns true if PRI capability is present, false otherwise.
 + */
 +bool pci_pri_supported(struct pci_dev *pdev)
 +{
 +      /* VFs share the PF PRI */
 +      if (pci_physfn(pdev)->pri_cap)
 +              return true;
 +      return false;
 +}
 +EXPORT_SYMBOL_GPL(pci_pri_supported);
  #endif /* CONFIG_PCI_PRI */
  
  #ifdef CONFIG_PCI_PASID
diff --combined drivers/pci/of.c
index 2ebc5e32e8a0c58ed5c2f9089c624678d09be398,4c3bd8696aaf2a425b9f90f4ad92cb0c75ca1049..ac24cd5439a932cd49f0d77abe73cc391f73c139
@@@ -42,7 -42,7 +42,7 @@@ void pci_set_bus_of_node(struct pci_bu
        } else {
                node = of_node_get(bus->self->dev.of_node);
                if (node && of_property_read_bool(node, "external-facing"))
 -                      bus->self->untrusted = true;
 +                      bus->self->external_facing = true;
        }
  
        bus->dev.of_node = node;
@@@ -243,6 -243,8 +243,8 @@@ EXPORT_SYMBOL_GPL(of_pci_check_probe_on
   * @busno: bus number associated with the bridge root bus
   * @bus_max: maximum number of buses for this bridge
   * @resources: list where the range of resources will be added after DT parsing
+  * @ib_resources: list where the range of inbound resources (with addresses
+  *                from 'dma-ranges') will be added after DT parsing
   * @io_base: pointer to a variable that will contain on return the physical
   * address for the start of the I/O range. Can be NULL if the caller doesn't
   * expect I/O ranges to be present in the device tree.
@@@ -521,26 -523,28 +523,26 @@@ int of_irq_parse_and_map_pci(const stru
  EXPORT_SYMBOL_GPL(of_irq_parse_and_map_pci);
  #endif        /* CONFIG_OF_IRQ */
  
 -int pci_parse_request_of_pci_ranges(struct device *dev,
 -                                  struct list_head *resources,
 -                                  struct list_head *ib_resources,
 -                                  struct resource **bus_range)
 +static int pci_parse_request_of_pci_ranges(struct device *dev,
 +                                         struct pci_host_bridge *bridge)
  {
        int err, res_valid = 0;
        resource_size_t iobase;
        struct resource_entry *win, *tmp;
  
 -      INIT_LIST_HEAD(resources);
 -      if (ib_resources)
 -              INIT_LIST_HEAD(ib_resources);
 -      err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, resources,
 -                                                  ib_resources, &iobase);
 +      INIT_LIST_HEAD(&bridge->windows);
 +      INIT_LIST_HEAD(&bridge->dma_ranges);
 +
 +      err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, &bridge->windows,
 +                                                  &bridge->dma_ranges, &iobase);
        if (err)
                return err;
  
 -      err = devm_request_pci_bus_resources(dev, resources);
 +      err = devm_request_pci_bus_resources(dev, &bridge->windows);
        if (err)
 -              goto out_release_res;
 +              return err;
  
 -      resource_list_for_each_entry_safe(win, tmp, resources) {
 +      resource_list_for_each_entry_safe(win, tmp, &bridge->windows) {
                struct resource *res = win->res;
  
                switch (resource_type(res)) {
                case IORESOURCE_MEM:
                        res_valid |= !(res->flags & IORESOURCE_PREFETCH);
                        break;
 -              case IORESOURCE_BUS:
 -                      if (bus_range)
 -                              *bus_range = res;
 -                      break;
                }
        }
  
 -      if (res_valid)
 +      if (!res_valid)
 +              dev_warn(dev, "non-prefetchable memory resource required\n");
 +
 +      return 0;
 +}
 +
 +int devm_of_pci_bridge_init(struct device *dev, struct pci_host_bridge *bridge)
 +{
 +      if (!dev->of_node)
                return 0;
  
 -      dev_err(dev, "non-prefetchable memory resource required\n");
 -      err = -EINVAL;
 +      bridge->swizzle_irq = pci_common_swizzle;
 +      bridge->map_irq = of_irq_parse_and_map_pci;
  
 - out_release_res:
 -      pci_free_resource_list(resources);
 -      return err;
 +      return pci_parse_request_of_pci_ranges(dev, bridge);
  }
 -EXPORT_SYMBOL_GPL(pci_parse_request_of_pci_ranges);
  
  #endif /* CONFIG_PCI */
  
diff --combined drivers/pci/setup-bus.c
index 4d870ed893856f595350c1bb34969bacadbe9e46,fb74d8eb80884d3f9343f6650ae2736351fdc7ff..3951e02b7dedad9dded202f4e79bf9a124bb3acf
@@@ -55,6 -55,7 +55,7 @@@ static void free_list(struct list_head 
   * @dev:      Device to which the resource belongs
   * @res:      Resource to be tracked
   * @add_size: Additional size to be optionally added to the resource
+  * @min_align:        Minimum memory window alignment
   */
  static int add_to_list(struct list_head *head, struct pci_dev *dev,
                       struct resource *res, resource_size_t add_size,
@@@ -152,7 -153,7 +153,7 @@@ static void pdev_sort_resources(struct 
  
                tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
                if (!tmp)
 -                      panic("pdev_sort_resources(): kmalloc() failed!\n");
 +                      panic("%s: kzalloc() failed!\n", __func__);
                tmp->res = r;
                tmp->dev = dev;
  
This page took 0.072477 seconds and 4 git commands to generate.