summaryrefslogtreecommitdiff
path: root/drivers/xen/xen-pciback
diff options
context:
space:
mode:
authorLinus Torvalds2026-02-21 16:37:42 -0800
committerLinus Torvalds2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/xen/xen-pciback
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/xen/xen-pciback')
-rw-r--r--drivers/xen/xen-pciback/conf_space.c2
-rw-r--r--drivers/xen/xen-pciback/conf_space_header.c4
-rw-r--r--drivers/xen/xen-pciback/conf_space_quirks.c2
-rw-r--r--drivers/xen/xen-pciback/passthrough.c4
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c8
-rw-r--r--drivers/xen/xen-pciback/pciback_ops.c2
-rw-r--r--drivers/xen/xen-pciback/vpci.c4
-rw-r--r--drivers/xen/xen-pciback/xenbus.c2
8 files changed, 14 insertions, 14 deletions
diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback/conf_space.c
index fbc40acd593f..a2ae8de6f9e2 100644
--- a/drivers/xen/xen-pciback/conf_space.c
+++ b/drivers/xen/xen-pciback/conf_space.c
@@ -401,7 +401,7 @@ int xen_pcibk_config_add_field_offset(struct pci_dev *dev,
struct config_field_entry *cfg_entry;
void *tmp;
- cfg_entry = kmalloc_obj(*cfg_entry, GFP_KERNEL);
+ cfg_entry = kmalloc_obj(*cfg_entry);
if (!cfg_entry) {
err = -ENOMEM;
goto out;
diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c
index 0efbd85cf7e1..8b50cbcbdfe1 100644
--- a/drivers/xen/xen-pciback/conf_space_header.c
+++ b/drivers/xen/xen-pciback/conf_space_header.c
@@ -33,7 +33,7 @@ struct pci_bar_info {
static void *command_init(struct pci_dev *dev, int offset)
{
- struct pci_cmd_info *cmd = kmalloc_obj(*cmd, GFP_KERNEL);
+ struct pci_cmd_info *cmd = kmalloc_obj(*cmd);
int err;
if (!cmd)
@@ -211,7 +211,7 @@ static void *bar_init(struct pci_dev *dev, int offset)
{
unsigned int pos;
const struct resource *res = dev->resource;
- struct pci_bar_info *bar = kzalloc_obj(*bar, GFP_KERNEL);
+ struct pci_bar_info *bar = kzalloc_obj(*bar);
if (!bar)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/xen/xen-pciback/conf_space_quirks.c b/drivers/xen/xen-pciback/conf_space_quirks.c
index 52c8d38cb434..675519b51287 100644
--- a/drivers/xen/xen-pciback/conf_space_quirks.c
+++ b/drivers/xen/xen-pciback/conf_space_quirks.c
@@ -97,7 +97,7 @@ int xen_pcibk_config_quirks_init(struct pci_dev *dev)
struct xen_pcibk_config_quirk *quirk;
int ret = 0;
- quirk = kzalloc_obj(*quirk, GFP_KERNEL);
+ quirk = kzalloc_obj(*quirk);
if (!quirk) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/xen/xen-pciback/passthrough.c b/drivers/xen/xen-pciback/passthrough.c
index 9d2583a7a19a..7a6df524c071 100644
--- a/drivers/xen/xen-pciback/passthrough.c
+++ b/drivers/xen/xen-pciback/passthrough.c
@@ -51,7 +51,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,
unsigned int domain, bus, devfn;
int err;
- dev_entry = kmalloc_obj(*dev_entry, GFP_KERNEL);
+ dev_entry = kmalloc_obj(*dev_entry);
if (!dev_entry)
return -ENOMEM;
dev_entry->dev = dev;
@@ -101,7 +101,7 @@ static int __xen_pcibk_init_devices(struct xen_pcibk_device *pdev)
{
struct passthrough_dev_data *dev_data;
- dev_data = kmalloc_obj(*dev_data, GFP_KERNEL);
+ dev_data = kmalloc_obj(*dev_data);
if (!dev_data)
return -ENOMEM;
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index ffc70ce61c8f..e4b27aecbf05 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -79,7 +79,7 @@ static struct pcistub_device *pcistub_device_alloc(struct pci_dev *dev)
dev_dbg(&dev->dev, "pcistub_device_alloc\n");
- psdev = kzalloc_obj(*psdev, GFP_KERNEL);
+ psdev = kzalloc_obj(*psdev);
if (!psdev)
return NULL;
@@ -623,7 +623,7 @@ static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
}
if (!match) {
- pci_dev_id = kmalloc_obj(*pci_dev_id, GFP_KERNEL);
+ pci_dev_id = kmalloc_obj(*pci_dev_id);
if (!pci_dev_id) {
err = -ENOMEM;
goto out;
@@ -1129,7 +1129,7 @@ static int pcistub_device_id_add(int domain, int bus, int slot, int func)
|| PCI_FUNC(devfn) != func)
return -EINVAL;
- pci_dev_id = kmalloc_obj(*pci_dev_id, GFP_KERNEL);
+ pci_dev_id = kmalloc_obj(*pci_dev_id);
if (!pci_dev_id)
return -ENOMEM;
@@ -1189,7 +1189,7 @@ static int pcistub_reg_add(int domain, int bus, int slot, int func,
}
dev = psdev->dev;
- field = kzalloc_obj(*field, GFP_KERNEL);
+ field = kzalloc_obj(*field);
if (!field) {
err = -ENOMEM;
goto out;
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c
index 2755ab0b0d85..bfc186bf05bc 100644
--- a/drivers/xen/xen-pciback/pciback_ops.c
+++ b/drivers/xen/xen-pciback/pciback_ops.c
@@ -219,7 +219,7 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
if (dev->msi_enabled || !(cmd & PCI_COMMAND_MEMORY))
return -ENXIO;
- entries = kmalloc_objs(*entries, op->value, GFP_KERNEL);
+ entries = kmalloc_objs(*entries, op->value);
if (entries == NULL)
return -ENOMEM;
diff --git a/drivers/xen/xen-pciback/vpci.c b/drivers/xen/xen-pciback/vpci.c
index 391ea1040b16..df292c19effb 100644
--- a/drivers/xen/xen-pciback/vpci.c
+++ b/drivers/xen/xen-pciback/vpci.c
@@ -81,7 +81,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,
goto out;
}
- dev_entry = kmalloc_obj(*dev_entry, GFP_KERNEL);
+ dev_entry = kmalloc_obj(*dev_entry);
if (!dev_entry) {
err = -ENOMEM;
xenbus_dev_fatal(pdev->xdev, err,
@@ -186,7 +186,7 @@ static int __xen_pcibk_init_devices(struct xen_pcibk_device *pdev)
int slot;
struct vpci_dev_data *vpci_dev;
- vpci_dev = kmalloc_obj(*vpci_dev, GFP_KERNEL);
+ vpci_dev = kmalloc_obj(*vpci_dev);
if (!vpci_dev)
return -ENOMEM;
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index d5e001ff0489..22ff9cf35fc4 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -38,7 +38,7 @@ static struct xen_pcibk_device *alloc_pdev(struct xenbus_device *xdev)
{
struct xen_pcibk_device *pdev;
- pdev = kzalloc_obj(struct xen_pcibk_device, GFP_KERNEL);
+ pdev = kzalloc_obj(struct xen_pcibk_device);
if (pdev == NULL)
goto out;
dev_dbg(&xdev->dev, "allocated pdev @ 0x%p\n", pdev);