mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
@@ -90,7 +90,7 @@ static struct pwrseq_unit *pwrseq_unit_new(const struct pwrseq_unit_data *data)
|
||||
{
|
||||
struct pwrseq_unit *unit;
|
||||
|
||||
unit = kzalloc_obj(*unit, GFP_KERNEL);
|
||||
unit = kzalloc_obj(*unit);
|
||||
if (!unit)
|
||||
return NULL;
|
||||
|
||||
@@ -138,7 +138,7 @@ static struct pwrseq_unit_dep *pwrseq_unit_dep_new(struct pwrseq_unit *unit)
|
||||
{
|
||||
struct pwrseq_unit_dep *dep;
|
||||
|
||||
dep = kzalloc_obj(*dep, GFP_KERNEL);
|
||||
dep = kzalloc_obj(*dep);
|
||||
if (!dep)
|
||||
return NULL;
|
||||
|
||||
@@ -195,7 +195,7 @@ pwrseq_target_new(const struct pwrseq_target_data *data)
|
||||
{
|
||||
struct pwrseq_target *target;
|
||||
|
||||
target = kzalloc_obj(*target, GFP_KERNEL);
|
||||
target = kzalloc_obj(*target);
|
||||
if (!target)
|
||||
return NULL;
|
||||
|
||||
@@ -669,7 +669,7 @@ struct pwrseq_desc *pwrseq_get(struct device *dev, const char *target)
|
||||
struct pwrseq_match_data match_data;
|
||||
int ret;
|
||||
|
||||
struct pwrseq_desc *desc __free(kfree) = kzalloc_obj(*desc, GFP_KERNEL);
|
||||
struct pwrseq_desc *desc __free(kfree) = kzalloc_obj(*desc);
|
||||
if (!desc)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ static int pwrseq_thead_gpu_match(struct pwrseq_device *pwrseq,
|
||||
PWRSEQ_MATCH_OK : PWRSEQ_NO_MATCH;
|
||||
|
||||
ctx->num_clks = ARRAY_SIZE(clk_names);
|
||||
ctx->clks = kzalloc_objs(*ctx->clks, ctx->num_clks, GFP_KERNEL);
|
||||
ctx->clks = kzalloc_objs(*ctx->clks, ctx->num_clks);
|
||||
if (!ctx->clks)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ static int __init pmu_bat_init(void)
|
||||
|
||||
for (i = 0; i < pmu_battery_count; i++) {
|
||||
struct power_supply_config psy_cfg = {};
|
||||
struct pmu_battery_dev *pbat = kzalloc_obj(*pbat, GFP_KERNEL);
|
||||
struct pmu_battery_dev *pbat = kzalloc_obj(*pbat);
|
||||
if (!pbat)
|
||||
break;
|
||||
|
||||
|
||||
@@ -1426,7 +1426,7 @@ int power_supply_register_extension(struct power_supply *psy, const struct power
|
||||
if (power_supply_has_property(psy, ext->properties[i]))
|
||||
return -EEXIST;
|
||||
|
||||
reg = kmalloc_obj(*reg, GFP_KERNEL);
|
||||
reg = kmalloc_obj(*reg);
|
||||
if (!reg)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ static int power_supply_register_led_trigger(struct power_supply *psy,
|
||||
if (err && *err)
|
||||
return *err;
|
||||
|
||||
psy_trig = kzalloc_obj(*psy_trig, GFP_KERNEL);
|
||||
psy_trig = kzalloc_obj(*psy_trig);
|
||||
if (!psy_trig)
|
||||
goto err_free_trigger;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user