summaryrefslogtreecommitdiff
path: root/drivers/pnp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/pnp
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/pnp')
-rw-r--r--drivers/pnp/card.c6
-rw-r--r--drivers/pnp/core.c2
-rw-r--r--drivers/pnp/driver.c2
-rw-r--r--drivers/pnp/interface.c4
-rw-r--r--drivers/pnp/quirks.c4
-rw-r--r--drivers/pnp/resource.c4
6 files changed, 11 insertions, 11 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index 226a81cdb664..87f5af454751 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -80,7 +80,7 @@ static int card_probe(struct pnp_card *card, struct pnp_card_driver *drv)
if (!id)
return 0;
- clink = kzalloc_obj(*clink, GFP_KERNEL);
+ clink = kzalloc_obj(*clink);
if (!clink)
return 0;
clink->card = card;
@@ -108,7 +108,7 @@ static struct pnp_id *pnp_add_card_id(struct pnp_card *card, char *id)
{
struct pnp_id *dev_id, *ptr;
- dev_id = kzalloc_obj(struct pnp_id, GFP_KERNEL);
+ dev_id = kzalloc_obj(struct pnp_id);
if (!dev_id)
return NULL;
@@ -159,7 +159,7 @@ struct pnp_card *pnp_alloc_card(struct pnp_protocol *protocol, int id, char *pnp
struct pnp_card *card;
struct pnp_id *dev_id;
- card = kzalloc_obj(struct pnp_card, GFP_KERNEL);
+ card = kzalloc_obj(struct pnp_card);
if (!card)
return NULL;
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 768388ddaeca..81603327079c 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -122,7 +122,7 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id,
struct pnp_dev *dev;
struct pnp_id *dev_id;
- dev = kzalloc_obj(struct pnp_dev, GFP_KERNEL);
+ dev = kzalloc_obj(struct pnp_dev);
if (!dev)
return NULL;
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 731a37002811..6d58b1465081 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -315,7 +315,7 @@ struct pnp_id *pnp_add_id(struct pnp_dev *dev, const char *id)
{
struct pnp_id *dev_id, *ptr;
- dev_id = kzalloc_obj(struct pnp_id, GFP_KERNEL);
+ dev_id = kzalloc_obj(struct pnp_id);
if (!dev_id)
return NULL;
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index 108f7c63ddc5..9303fef72df0 100644
--- a/drivers/pnp/interface.c
+++ b/drivers/pnp/interface.c
@@ -214,7 +214,7 @@ static ssize_t options_show(struct device *dmdev, struct device_attribute *attr,
int ret, dep = 0, set = 0;
char *indent;
- buffer = kzalloc_obj(*buffer, GFP_KERNEL);
+ buffer = kzalloc_obj(*buffer);
if (!buffer)
return -ENOMEM;
@@ -257,7 +257,7 @@ static ssize_t resources_show(struct device *dmdev,
if (!dev)
return -EINVAL;
- buffer = kzalloc_obj(*buffer, GFP_KERNEL);
+ buffer = kzalloc_obj(*buffer);
if (!buffer)
return -ENOMEM;
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 2afa17c39628..7aaecd137d31 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -29,7 +29,7 @@ static void quirk_awe32_add_ports(struct pnp_dev *dev,
{
struct pnp_option *new_option;
- new_option = kmalloc_obj(struct pnp_option, GFP_KERNEL);
+ new_option = kmalloc_obj(struct pnp_option);
if (!new_option) {
dev_err(&dev->dev, "couldn't add ioport region to option set "
"%d\n", pnp_option_set(option));
@@ -155,7 +155,7 @@ static struct pnp_option *pnp_clone_dependent_set(struct pnp_dev *dev,
list_for_each_entry(option, &dev->options, list) {
if (pnp_option_is_dependent(option) &&
pnp_option_set(option) == set) {
- new_option = kmalloc_obj(struct pnp_option, GFP_KERNEL);
+ new_option = kmalloc_obj(struct pnp_option);
if (!new_option) {
dev_err(&dev->dev, "couldn't clone dependent "
"set %d\n", set);
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index f62544ec5a1f..6792bd023123 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -38,7 +38,7 @@ static struct pnp_option *pnp_build_option(struct pnp_dev *dev, unsigned long ty
{
struct pnp_option *option;
- option = kzalloc_obj(struct pnp_option, GFP_KERNEL);
+ option = kzalloc_obj(struct pnp_option);
if (!option)
return NULL;
@@ -499,7 +499,7 @@ static struct pnp_resource *pnp_new_resource(struct pnp_dev *dev)
{
struct pnp_resource *pnp_res;
- pnp_res = kzalloc_obj(struct pnp_resource, GFP_KERNEL);
+ pnp_res = kzalloc_obj(struct pnp_resource);
if (!pnp_res)
return NULL;