mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-04 20:57:45 -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:
@@ -32,7 +32,7 @@ static struct block_device **fscrypt_get_devices(struct super_block *sb,
|
||||
if (devs)
|
||||
return devs;
|
||||
}
|
||||
devs = kmalloc_obj(*devs, GFP_KERNEL);
|
||||
devs = kmalloc_obj(*devs);
|
||||
if (!devs)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
devs[0] = sb->s_bdev;
|
||||
@@ -169,7 +169,7 @@ int fscrypt_prepare_inline_crypt_key(struct fscrypt_prepared_key *prep_key,
|
||||
unsigned int i;
|
||||
int err;
|
||||
|
||||
blk_key = kmalloc_obj(*blk_key, GFP_KERNEL);
|
||||
blk_key = kmalloc_obj(*blk_key);
|
||||
if (!blk_key)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ static int allocate_filesystem_keyring(struct super_block *sb)
|
||||
if (sb->s_master_keys)
|
||||
return 0;
|
||||
|
||||
keyring = kzalloc_obj(*keyring, GFP_KERNEL);
|
||||
keyring = kzalloc_obj(*keyring);
|
||||
if (!keyring)
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&keyring->lock);
|
||||
@@ -434,7 +434,7 @@ static int add_new_master_key(struct super_block *sb,
|
||||
struct fscrypt_master_key *mk;
|
||||
int err;
|
||||
|
||||
mk = kzalloc_obj(*mk, GFP_KERNEL);
|
||||
mk = kzalloc_obj(*mk);
|
||||
if (!mk)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ fscrypt_get_direct_key(const struct fscrypt_inode_info *ci, const u8 *raw_key)
|
||||
return dk;
|
||||
|
||||
/* Nope, allocate one. */
|
||||
dk = kzalloc_obj(*dk, GFP_KERNEL);
|
||||
dk = kzalloc_obj(*dk);
|
||||
if (!dk)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
dk->dk_sb = ci->ci_inode->i_sb;
|
||||
|
||||
@@ -813,7 +813,7 @@ int fscrypt_parse_test_dummy_encryption(const struct fs_parameter *param,
|
||||
if (param->type == fs_value_is_string && *param->string)
|
||||
arg = param->string;
|
||||
|
||||
policy = kzalloc_obj(*policy, GFP_KERNEL);
|
||||
policy = kzalloc_obj(*policy);
|
||||
if (!policy)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user