Commit 8b28a3f3 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/misc'

- Remove unnecessary #includes (Gustavo Pimentel)

- Fix intel_mid_pci.c build error when !CONFIG_ACPI (Randy Dunlap)

- Use scnprintf(), not snprintf(), in sysfs "show" functions (Krzysztof
  Wilczyński)

- Simplify pci-pf-stub by using module_pci_driver() (Liu Shixin)

- Print IRQ used by Link Bandwidth Notification (Dongdong Liu)

- Update sysfs mmap-related #ifdef comments (Clint Sbisa)

- Simplify pci_dev_reset_slot_function() (Lukas Wunner)

- Use "NULL" instead of "0" to fix sparse warnings (Gustavo Pimentel)

- Simplify bool comparisons (Krzysztof Wilczyński)

- Drop double zeroing for P2PDMA sg_init_table() (Julia Lawall)

* pci/misc:
  PCI: v3-semi: Remove unneeded break
  PCI/P2PDMA: Drop double zeroing for sg_init_table()
  PCI: Simplify bool comparisons
  PCI: endpoint: Use "NULL" instead of "0" as a NULL pointer
  PCI: Simplify pci_dev_reset_slot_function()
  PCI: Update mmap-related #ifdef comments
  PCI/LINK: Print IRQ number used by port
  PCI/IOV: Simplify pci-pf-stub with module_pci_driver()
  PCI: Use scnprintf(), not snprintf(), in sysfs "show" functions
  x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled
  PCI: Remove unnecessary header includes
parents 0d2493ab 58e0cd3e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <asm/hw_irq.h>
#include <asm/io_apic.h>
#include <asm/intel-mid.h>
#include <asm/acpi.h>

#define PCIE_CAP_OFFSET	0x100

+0 −1
Original line number Diff line number Diff line
@@ -658,7 +658,6 @@ static int v3_get_dma_range_config(struct v3_pci *v3,
	default:
		dev_err(v3->dev, "illegal dma memory chunk size\n");
		return -EINVAL;
		break;
	}
	val |= V3_PCI_MAP_M_REG_EN | V3_PCI_MAP_M_ENABLE;
	*pci_map = val;
+5 −5
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ static ssize_t size_show(struct device *dev, struct device_attribute *attr,
	if (pdev->p2pdma->pool)
		size = gen_pool_size(pdev->p2pdma->pool);

	return snprintf(buf, PAGE_SIZE, "%zd\n", size);
	return scnprintf(buf, PAGE_SIZE, "%zd\n", size);
}
static DEVICE_ATTR_RO(size);

@@ -66,7 +66,7 @@ static ssize_t available_show(struct device *dev, struct device_attribute *attr,
	if (pdev->p2pdma->pool)
		avail = gen_pool_avail(pdev->p2pdma->pool);

	return snprintf(buf, PAGE_SIZE, "%zd\n", avail);
	return scnprintf(buf, PAGE_SIZE, "%zd\n", avail);
}
static DEVICE_ATTR_RO(available);

@@ -75,7 +75,7 @@ static ssize_t published_show(struct device *dev, struct device_attribute *attr,
{
	struct pci_dev *pdev = to_pci_dev(dev);

	return snprintf(buf, PAGE_SIZE, "%d\n",
	return scnprintf(buf, PAGE_SIZE, "%d\n",
			 pdev->p2pdma->p2pmem_published);
}
static DEVICE_ATTR_RO(published);
@@ -761,7 +761,7 @@ struct scatterlist *pci_p2pmem_alloc_sgl(struct pci_dev *pdev,
	struct scatterlist *sg;
	void *addr;

	sg = kzalloc(sizeof(*sg), GFP_KERNEL);
	sg = kmalloc(sizeof(*sg), GFP_KERNEL);
	if (!sg)
		return NULL;

+1 −13
Original line number Diff line number Diff line
@@ -37,18 +37,6 @@ static struct pci_driver pf_stub_driver = {
	.probe			= pci_pf_stub_probe,
	.sriov_configure	= pci_sriov_configure_simple,
};

static int __init pci_pf_stub_init(void)
{
	return pci_register_driver(&pf_stub_driver);
}

static void __exit pci_pf_stub_exit(void)
{
	pci_unregister_driver(&pf_stub_driver);
}

module_init(pci_pf_stub_init);
module_exit(pci_pf_stub_exit);
module_pci_driver(pf_stub_driver);

MODULE_LICENSE("GPL");
+3 −3
Original line number Diff line number Diff line
@@ -574,7 +574,7 @@ static ssize_t driver_override_show(struct device *dev,
	ssize_t len;

	device_lock(dev);
	len = snprintf(buf, PAGE_SIZE, "%s\n", pdev->driver_override);
	len = scnprintf(buf, PAGE_SIZE, "%s\n", pdev->driver_override);
	device_unlock(dev);
	return len;
}
@@ -1197,10 +1197,10 @@ static int pci_create_resource_files(struct pci_dev *pdev)
	}
	return 0;
}
#else /* !HAVE_PCI_MMAP */
#else /* !(defined(HAVE_PCI_MMAP) || defined(ARCH_GENERIC_PCI_MMAP_RESOURCE)) */
int __weak pci_create_resource_files(struct pci_dev *dev) { return 0; }
void __weak pci_remove_resource_files(struct pci_dev *dev) { return; }
#endif /* HAVE_PCI_MMAP */
#endif

/**
 * pci_write_rom - used to enable access to the PCI ROM display
Loading