Commit 7174609f authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Greg Kroah-Hartman

padata: get_next is never NULL

commit 69b34844 upstream.

Per Dan's static checker warning, the code that returns NULL was removed
in 2010, so this patch updates the comments and fixes the code
assumptions.
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c4c5322a
...@@ -156,8 +156,6 @@ EXPORT_SYMBOL(padata_do_parallel); ...@@ -156,8 +156,6 @@ EXPORT_SYMBOL(padata_do_parallel);
* A pointer to the control struct of the next object that needs * A pointer to the control struct of the next object that needs
* serialization, if present in one of the percpu reorder queues. * serialization, if present in one of the percpu reorder queues.
* *
* NULL, if all percpu reorder queues are empty.
*
* -EINPROGRESS, if the next object that needs serialization will * -EINPROGRESS, if the next object that needs serialization will
* be parallel processed by another cpu and is not yet present in * be parallel processed by another cpu and is not yet present in
* the cpu's reorder queue. * the cpu's reorder queue.
...@@ -184,8 +182,6 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd) ...@@ -184,8 +182,6 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd)
cpu = padata_index_to_cpu(pd, next_index); cpu = padata_index_to_cpu(pd, next_index);
next_queue = per_cpu_ptr(pd->pqueue, cpu); next_queue = per_cpu_ptr(pd->pqueue, cpu);
padata = NULL;
reorder = &next_queue->reorder; reorder = &next_queue->reorder;
spin_lock(&reorder->lock); spin_lock(&reorder->lock);
...@@ -237,12 +233,11 @@ static void padata_reorder(struct parallel_data *pd) ...@@ -237,12 +233,11 @@ static void padata_reorder(struct parallel_data *pd)
padata = padata_get_next(pd); padata = padata_get_next(pd);
/* /*
* All reorder queues are empty, or the next object that needs * If the next object that needs serialization is parallel
* serialization is parallel processed by another cpu and is * processed by another cpu and is still on it's way to the
* still on it's way to the cpu's reorder queue, nothing to * cpu's reorder queue, nothing to do for now.
* do for now.
*/ */
if (!padata || PTR_ERR(padata) == -EINPROGRESS) if (PTR_ERR(padata) == -EINPROGRESS)
break; break;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment