3.16.84-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: "Jason A. Donenfeld" <ja...@zx2c4.com>

commit 69b348449bda0f9588737539cfe135774c9939a7 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: Jason A. Donenfeld <ja...@zx2c4.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Acked-by: Steffen Klassert <steffen.klass...@secunet.com>
Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
 kernel/padata.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -153,8 +153,6 @@ EXPORT_SYMBOL(padata_do_parallel);
  * A pointer to the control struct of the next object that needs
  * 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
  *  be parallel processed by another cpu and is not yet present in
  *  the cpu's reorder queue.
@@ -181,8 +179,6 @@ static struct padata_priv *padata_get_ne
        cpu = padata_index_to_cpu(pd, next_index);
        next_queue = per_cpu_ptr(pd->pqueue, cpu);
 
-       padata = NULL;
-
        reorder = &next_queue->reorder;
 
        spin_lock(&reorder->lock);
@@ -234,12 +230,11 @@ static void padata_reorder(struct parall
                padata = padata_get_next(pd);
 
                /*
-                * All reorder queues are empty, or the next object that needs
-                * serialization is parallel processed by another cpu and is
-                * still on it's way to the cpu's reorder queue, nothing to
-                * do for now.
+                * If the next object that needs serialization is parallel
+                * processed by another cpu and is still on it's way to the
+                * cpu's reorder queue, nothing to do for now.
                 */
-               if (!padata || PTR_ERR(padata) == -EINPROGRESS)
+               if (PTR_ERR(padata) == -EINPROGRESS)
                        break;
 
                /*

Reply via email to