mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
padata: remove start function
padata_start() is only used right after pcrypt allocates an instance with all possible CPUs, when PADATA_INVALID can't happen, so there's no need for a separate "start" step. It can be done during allocation to save text, make using padata easier, and avoid unneeded calls in the future. Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Steffen Klassert <steffen.klassert@secunet.com> Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
c06c76602e
commit
bd25b4886d
@@ -789,30 +789,6 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL(padata_set_cpumask);
|
||||
|
||||
/**
|
||||
* padata_start - start the parallel processing
|
||||
*
|
||||
* @pinst: padata instance to start
|
||||
*
|
||||
* Return: 0 on success or negative error code
|
||||
*/
|
||||
int padata_start(struct padata_instance *pinst)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
mutex_lock(&pinst->lock);
|
||||
|
||||
if (pinst->flags & PADATA_INVALID)
|
||||
err = -EINVAL;
|
||||
|
||||
__padata_start(pinst);
|
||||
|
||||
mutex_unlock(&pinst->lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(padata_start);
|
||||
|
||||
/**
|
||||
* padata_stop - stop the parallel processing
|
||||
*
|
||||
@@ -1100,7 +1076,7 @@ static struct padata_instance *padata_alloc(const char *name,
|
||||
if (padata_setup_cpumasks(pinst))
|
||||
goto err_free_rcpumask_cbcpu;
|
||||
|
||||
pinst->flags = 0;
|
||||
__padata_start(pinst);
|
||||
|
||||
kobject_init(&pinst->kobj, &padata_attr_type);
|
||||
mutex_init(&pinst->lock);
|
||||
|
Reference in New Issue
Block a user