Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621933 > unrolled thread
| Started by | "Jason A. Donenfeld" <Jason@zx2c4.com> |
|---|---|
| First post | 2017-04-12 10:50 +0200 |
| Last post | 2017-04-14 09:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] padata: get_next is never NULL "Jason A. Donenfeld" <Jason@zx2c4.com> - 2017-04-12 10:50 +0200
Re: [PATCH] padata: get_next is never NULL Steffen Klassert <steffen.klassert@secunet.com> - 2017-04-14 09:50 +0200
| From | "Jason A. Donenfeld" <Jason@zx2c4.com> |
|---|---|
| Date | 2017-04-12 10:50 +0200 |
| Subject | [PATCH] padata: get_next is never NULL |
| Message-ID | <tvm8p-2hK-11@gated-at.bofh.it> |
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 <Jason@zx2c4.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> --- kernel/padata.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/kernel/padata.c b/kernel/padata.c index f1aef1639204..ac8f1e524836 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -154,8 +154,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. @@ -182,8 +180,6 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd) 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); @@ -235,12 +231,11 @@ static void padata_reorder(struct parallel_data *pd) 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; /* -- 2.12.2
[toc] | [next] | [standalone]
| From | Steffen Klassert <steffen.klassert@secunet.com> |
|---|---|
| Date | 2017-04-14 09:50 +0200 |
| Message-ID | <tw49s-6LB-11@gated-at.bofh.it> |
| In reply to | #1621933 |
On Wed, Apr 12, 2017 at 10:40:19AM +0200, Jason A. Donenfeld wrote: > 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 <Jason@zx2c4.com> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> This looks ok, Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web