summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
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/cpufreq
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
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/cpufreq')
-rw-r--r--drivers/cpufreq/acpi-cpufreq.c2
-rw-r--r--drivers/cpufreq/amd-pstate.c4
-rw-r--r--drivers/cpufreq/apple-soc-cpufreq.c2
-rw-r--r--drivers/cpufreq/armada-8k-cpufreq.c2
-rw-r--r--drivers/cpufreq/bmips-cpufreq.c2
-rw-r--r--drivers/cpufreq/cppc_cpufreq.c2
-rw-r--r--drivers/cpufreq/cpufreq.c2
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c4
-rw-r--r--drivers/cpufreq/cpufreq_governor.c2
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c4
-rw-r--r--drivers/cpufreq/cpufreq_stats.c2
-rw-r--r--drivers/cpufreq/cpufreq_userspace.c2
-rw-r--r--drivers/cpufreq/e_powersaver.c2
-rw-r--r--drivers/cpufreq/gx-suspmod.c2
-rw-r--r--drivers/cpufreq/intel_pstate.c4
-rw-r--r--drivers/cpufreq/powernow-k7.c2
-rw-r--r--drivers/cpufreq/powernow-k8.c2
-rw-r--r--drivers/cpufreq/powernv-cpufreq.c8
-rw-r--r--drivers/cpufreq/pxa3xx-cpufreq.c2
-rw-r--r--drivers/cpufreq/qcom-cpufreq-hw.c2
-rw-r--r--drivers/cpufreq/qoriq-cpufreq.c6
-rw-r--r--drivers/cpufreq/scmi-cpufreq.c2
-rw-r--r--drivers/cpufreq/scpi-cpufreq.c2
-rw-r--r--drivers/cpufreq/spear-cpufreq.c2
-rw-r--r--drivers/cpufreq/sun50i-cpufreq-nvmem.c2
-rw-r--r--drivers/cpufreq/tegra186-cpufreq.c2
-rw-r--r--drivers/cpufreq/tegra194-cpufreq.c2
-rw-r--r--drivers/cpufreq/vexpress-spc-cpufreq.c2
-rw-r--r--drivers/cpufreq/virtual-cpufreq.c2
29 files changed, 38 insertions, 38 deletions
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 8576c8290ea5..3b95a3609cde 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -700,7 +700,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
return blacklisted;
#endif
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index dec47f7ce192..5aa9fcd80cf5 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -993,7 +993,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
if (!dev)
return -ENODEV;
- cpudata = kzalloc_obj(*cpudata, GFP_KERNEL);
+ cpudata = kzalloc_obj(*cpudata);
if (!cpudata)
return -ENOMEM;
@@ -1478,7 +1478,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
if (!dev)
return -ENODEV;
- cpudata = kzalloc_obj(*cpudata, GFP_KERNEL);
+ cpudata = kzalloc_obj(*cpudata);
if (!cpudata)
return -ENOMEM;
diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c
index bf6061e2089a..9396034167e5 100644
--- a/drivers/cpufreq/apple-soc-cpufreq.c
+++ b/drivers/cpufreq/apple-soc-cpufreq.c
@@ -276,7 +276,7 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
goto out_free_opp;
}
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv) {
ret = -ENOMEM;
goto out_free_opp;
diff --git a/drivers/cpufreq/armada-8k-cpufreq.c b/drivers/cpufreq/armada-8k-cpufreq.c
index c7d4a15f10bc..9d55398f3797 100644
--- a/drivers/cpufreq/armada-8k-cpufreq.c
+++ b/drivers/cpufreq/armada-8k-cpufreq.c
@@ -143,7 +143,7 @@ static int __init armada_8k_cpufreq_init(void)
of_node_put(node);
nb_cpus = num_possible_cpus();
- freq_tables = kzalloc_objs(*freq_tables, nb_cpus, GFP_KERNEL);
+ freq_tables = kzalloc_objs(*freq_tables, nb_cpus);
if (!freq_tables)
return -ENOMEM;
cpumask_copy(&cpus, cpu_possible_mask);
diff --git a/drivers/cpufreq/bmips-cpufreq.c b/drivers/cpufreq/bmips-cpufreq.c
index f8c91796b498..a8e35bc75fb2 100644
--- a/drivers/cpufreq/bmips-cpufreq.c
+++ b/drivers/cpufreq/bmips-cpufreq.c
@@ -71,7 +71,7 @@ bmips_cpufreq_get_freq_table(const struct cpufreq_policy *policy)
cpu_freq = htp_freq_to_cpu_freq(priv->clk_mult);
- table = kmalloc_objs(*table, priv->max_freqs + 1, GFP_KERNEL);
+ table = kmalloc_objs(*table, priv->max_freqs + 1);
if (!table)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 7abfd2753946..011f35cb47b9 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -575,7 +575,7 @@ static struct cppc_cpudata *cppc_cpufreq_get_cpu_data(unsigned int cpu)
struct cppc_cpudata *cpu_data;
int ret;
- cpu_data = kzalloc_obj(struct cppc_cpudata, GFP_KERNEL);
+ cpu_data = kzalloc_obj(struct cppc_cpudata);
if (!cpu_data)
goto out;
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 98035c9fbc17..277884d91913 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1263,7 +1263,7 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
if (!dev)
return NULL;
- policy = kzalloc_obj(*policy, GFP_KERNEL);
+ policy = kzalloc_obj(*policy);
if (!policy)
return NULL;
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index f0c16e615a46..e0e847764511 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -273,7 +273,7 @@ static struct policy_dbs_info *cs_alloc(void)
{
struct cs_policy_dbs_info *dbs_info;
- dbs_info = kzalloc_obj(*dbs_info, GFP_KERNEL);
+ dbs_info = kzalloc_obj(*dbs_info);
return dbs_info ? &dbs_info->policy_dbs : NULL;
}
@@ -286,7 +286,7 @@ static int cs_init(struct dbs_data *dbs_data)
{
struct cs_dbs_tuners *tuners;
- tuners = kzalloc_obj(*tuners, GFP_KERNEL);
+ tuners = kzalloc_obj(*tuners);
if (!tuners)
return -ENOMEM;
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
index 1dbb3b10ee83..36eb7aee4bcd 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -429,7 +429,7 @@ int cpufreq_dbs_governor_init(struct cpufreq_policy *policy)
goto out;
}
- dbs_data = kzalloc_obj(*dbs_data, GFP_KERNEL);
+ dbs_data = kzalloc_obj(*dbs_data);
if (!dbs_data) {
ret = -ENOMEM;
goto free_policy_dbs_info;
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index ecb5021f46bd..9942dbb38dae 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -322,7 +322,7 @@ static struct policy_dbs_info *od_alloc(void)
{
struct od_policy_dbs_info *dbs_info;
- dbs_info = kzalloc_obj(*dbs_info, GFP_KERNEL);
+ dbs_info = kzalloc_obj(*dbs_info);
return dbs_info ? &dbs_info->policy_dbs : NULL;
}
@@ -335,7 +335,7 @@ static int od_init(struct dbs_data *dbs_data)
{
struct od_dbs_tuners *tuners;
- tuners = kzalloc_obj(*tuners, GFP_KERNEL);
+ tuners = kzalloc_obj(*tuners);
if (!tuners)
return -ENOMEM;
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 407b8fcf0723..670a10c3ecfa 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -222,7 +222,7 @@ void cpufreq_stats_create_table(struct cpufreq_policy *policy)
if (policy->stats)
return;
- stats = kzalloc_obj(*stats, GFP_KERNEL);
+ stats = kzalloc_obj(*stats);
if (!stats)
return;
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c
index c8e941b4ec03..d738d31995f9 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -58,7 +58,7 @@ static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy)
{
struct userspace_policy *userspace;
- userspace = kzalloc_obj(*userspace, GFP_KERNEL);
+ userspace = kzalloc_obj(*userspace);
if (!userspace)
return -ENOMEM;
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index e079f1fed352..05209d9e9d27 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -55,7 +55,7 @@ static struct acpi_processor_performance *eps_acpi_cpu_perf;
/* Minimum necessary to get acpi_processor_get_bios_limit() working */
static int eps_acpi_init(void)
{
- eps_acpi_cpu_perf = kzalloc_obj(*eps_acpi_cpu_perf, GFP_KERNEL);
+ eps_acpi_cpu_perf = kzalloc_obj(*eps_acpi_cpu_perf);
if (!eps_acpi_cpu_perf)
return -ENOMEM;
diff --git a/drivers/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c
index ceadf0654838..d269a4f26f98 100644
--- a/drivers/cpufreq/gx-suspmod.c
+++ b/drivers/cpufreq/gx-suspmod.c
@@ -458,7 +458,7 @@ static int __init cpufreq_gx_init(void)
pr_debug("geode suspend modulation available.\n");
- params = kzalloc_obj(*params, GFP_KERNEL);
+ params = kzalloc_obj(*params);
if (params == NULL)
return -ENOMEM;
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 00232f178630..a48af3540c74 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2745,7 +2745,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
cpu = all_cpu_data[cpunum];
if (!cpu) {
- cpu = kzalloc_obj(*cpu, GFP_KERNEL);
+ cpu = kzalloc_obj(*cpu);
if (!cpu)
return -ENOMEM;
@@ -3301,7 +3301,7 @@ static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
/* This reflects the intel_pstate_get_cpu_pstates() setting. */
policy->cur = policy->cpuinfo.min_freq;
- req = kzalloc_objs(*req, 2, GFP_KERNEL);
+ req = kzalloc_objs(*req, 2);
if (!req) {
ret = -ENOMEM;
goto pstate_exit;
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 77847b52d613..6b7caf4ae20d 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -304,7 +304,7 @@ static int powernow_acpi_init(void)
goto err0;
}
- acpi_processor_perf = kzalloc_obj(*acpi_processor_perf, GFP_KERNEL);
+ acpi_processor_perf = kzalloc_obj(*acpi_processor_perf);
if (!acpi_processor_perf) {
retval = -ENOMEM;
goto err0;
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index b7c9676c96ef..4d77eef53fe0 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1029,7 +1029,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
if (rc)
return -ENODEV;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return -ENOMEM;
diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c
index 7ab29fd8e4e5..4a6f4d9043e9 100644
--- a/drivers/cpufreq/powernv-cpufreq.c
+++ b/drivers/cpufreq/powernv-cpufreq.c
@@ -323,7 +323,7 @@ next:
powernv_freqs[i].frequency = freq * 1000; /* kHz */
powernv_freqs[i].driver_data = id & 0xFF;
- revmap_data = kmalloc_obj(*revmap_data, GFP_KERNEL);
+ revmap_data = kmalloc_obj(*revmap_data);
if (!revmap_data) {
rc = -ENOMEM;
goto out;
@@ -857,7 +857,7 @@ static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy)
return 0;
/* Initialise Gpstate ramp-down timer only on POWER8 */
- gpstates = kzalloc_obj(*gpstates, GFP_KERNEL);
+ gpstates = kzalloc_obj(*gpstates);
if (!gpstates)
return -ENOMEM;
@@ -1053,7 +1053,7 @@ static int init_chip_info(void)
return -ENOMEM;
/* Allocate a chip cpu mask large enough to fit mask for all chips */
- chip_cpu_mask = kzalloc_objs(cpumask_t, MAX_NR_CHIPS, GFP_KERNEL);
+ chip_cpu_mask = kzalloc_objs(cpumask_t, MAX_NR_CHIPS);
if (!chip_cpu_mask) {
ret = -ENOMEM;
goto free_and_return;
@@ -1069,7 +1069,7 @@ static int init_chip_info(void)
cpumask_set_cpu(cpu, &chip_cpu_mask[nr_chips-1]);
}
- chips = kzalloc_objs(struct chip, nr_chips, GFP_KERNEL);
+ chips = kzalloc_objs(struct chip, nr_chips);
if (!chips) {
ret = -ENOMEM;
goto out_free_chip_cpu_mask;
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c
index 839a55bee151..50ff3b6a6900 100644
--- a/drivers/cpufreq/pxa3xx-cpufreq.c
+++ b/drivers/cpufreq/pxa3xx-cpufreq.c
@@ -110,7 +110,7 @@ static int setup_freqs_table(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *table;
int i;
- table = kzalloc_objs(*table, num + 1, GFP_KERNEL);
+ table = kzalloc_objs(*table, num + 1);
if (table == NULL)
return -ENOMEM;
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index 3dbf432efaeb..ea9a20d27b8f 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -211,7 +211,7 @@ static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
struct qcom_cpufreq_data *drv_data = policy->driver_data;
const struct qcom_cpufreq_soc_data *soc_data = qcom_cpufreq.soc_data;
- table = kzalloc_objs(*table, LUT_MAX_ENTRIES + 1, GFP_KERNEL);
+ table = kzalloc_objs(*table, LUT_MAX_ENTRIES + 1);
if (!table)
return -ENOMEM;
diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c
index df560851ffa8..42edb41ad459 100644
--- a/drivers/cpufreq/qoriq-cpufreq.c
+++ b/drivers/cpufreq/qoriq-cpufreq.c
@@ -168,7 +168,7 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy)
if (!np)
return -ENODEV;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
goto err_np;
@@ -181,11 +181,11 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy)
hwclk = __clk_get_hw(policy->clk);
count = clk_hw_get_num_parents(hwclk);
- data->pclk = kzalloc_objs(struct clk *, count, GFP_KERNEL);
+ data->pclk = kzalloc_objs(struct clk *, count);
if (!data->pclk)
goto err_nomem2;
- table = kzalloc_objs(*table, count + 1, GFP_KERNEL);
+ table = kzalloc_objs(*table, count + 1);
if (!table)
goto err_pclk;
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 9c0a903f4fb0..4edb4f7a8aa9 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -214,7 +214,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
if (domain < 0)
return domain;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c
index 1799e40596b7..09e29b2a6d8e 100644
--- a/drivers/cpufreq/scpi-cpufreq.c
+++ b/drivers/cpufreq/scpi-cpufreq.c
@@ -128,7 +128,7 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy)
goto out_free_opp;
}
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv) {
ret = -ENOMEM;
goto out_free_opp;
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 9a52d8030449..81a0780b2ebf 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -191,7 +191,7 @@ static int spear_cpufreq_probe(struct platform_device *pdev)
goto out_put_node;
}
- freq_tbl = kzalloc_objs(*freq_tbl, cnt + 1, GFP_KERNEL);
+ freq_tbl = kzalloc_objs(*freq_tbl, cnt + 1);
if (!freq_tbl) {
ret = -ENOMEM;
goto out_put_node;
diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
index f4e5a09103d2..9261d148a165 100644
--- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c
+++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
@@ -244,7 +244,7 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev)
int speed;
int ret;
- opp_tokens = kzalloc_objs(*opp_tokens, num_possible_cpus(), GFP_KERNEL);
+ opp_tokens = kzalloc_objs(*opp_tokens, num_possible_cpus());
if (!opp_tokens)
return -ENOMEM;
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index 5c2f134f8033..4fa6894f6371 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -135,7 +135,7 @@ static int tegra_cpufreq_init_cpufreq_table(struct cpufreq_policy *policy,
dev_pm_opp_disable(cpu_dev, rate);
}
- freq_table = kzalloc_objs(*freq_table, (max_opps + 1), GFP_KERNEL);
+ freq_table = kzalloc_objs(*freq_table, (max_opps + 1));
if (!freq_table)
return -ENOMEM;
diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
index 22f51dc2fa67..7a41cfc71a46 100644
--- a/drivers/cpufreq/tegra194-cpufreq.c
+++ b/drivers/cpufreq/tegra194-cpufreq.c
@@ -463,7 +463,7 @@ static int tegra_cpufreq_init_cpufreq_table(struct cpufreq_policy *policy,
return ret;
}
- freq_table = kzalloc_objs(*freq_table, (max_opps + 1), GFP_KERNEL);
+ freq_table = kzalloc_objs(*freq_table, (max_opps + 1));
if (!freq_table)
return -ENOMEM;
diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c
index 894f801b1b41..8e4e29138464 100644
--- a/drivers/cpufreq/vexpress-spc-cpufreq.c
+++ b/drivers/cpufreq/vexpress-spc-cpufreq.c
@@ -252,7 +252,7 @@ static int merge_cluster_tables(void)
for (i = 0; i < MAX_CLUSTERS; i++)
count += get_table_count(freq_table[i]);
- table = kzalloc_objs(*table, count, GFP_KERNEL);
+ table = kzalloc_objs(*table, count);
if (!table)
return -ENOMEM;
diff --git a/drivers/cpufreq/virtual-cpufreq.c b/drivers/cpufreq/virtual-cpufreq.c
index 92da4d5606e1..4159f31349b1 100644
--- a/drivers/cpufreq/virtual-cpufreq.c
+++ b/drivers/cpufreq/virtual-cpufreq.c
@@ -171,7 +171,7 @@ static int virt_cpufreq_get_freq_info(struct cpufreq_policy *policy)
return 0;
}
- table = kzalloc_objs(*table, num_perftbl_entries + 1, GFP_KERNEL);
+ table = kzalloc_objs(*table, num_perftbl_entries + 1);
if (!table)
return -ENOMEM;