diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-04-28 09:33:37 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-05-14 19:07:55 +0800 |
commit | fa8edbb630ae9ef99d4ab570a16f01c3c39d9a86 (patch) | |
tree | 4d97fd02859379a378f15a5628204f3917f5c161 /drivers/crypto/cavium/cpt | |
parent | crypto: ccp - Annotate SEV Firmware file names (diff) | |
download | linux-dev-fa8edbb630ae9ef99d4ab570a16f01c3c39d9a86.tar.xz linux-dev-fa8edbb630ae9ef99d4ab570a16f01c3c39d9a86.zip |
crypto: cpt - Use 'hlist_for_each_entry' to simplify code
Use 'hlist_for_each_entry' instead of hand writing it.
This saves a few lines of code.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/cavium/cpt')
-rw-r--r-- | drivers/crypto/cavium/cpt/cptvf_reqmanager.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/crypto/cavium/cpt/cptvf_reqmanager.c b/drivers/crypto/cavium/cpt/cptvf_reqmanager.c index 4fe7898c8561..feb0f76783dd 100644 --- a/drivers/crypto/cavium/cpt/cptvf_reqmanager.c +++ b/drivers/crypto/cavium/cpt/cptvf_reqmanager.c @@ -244,11 +244,7 @@ static int send_cpt_command(struct cpt_vf *cptvf, union cpt_inst_s *cmd, memcpy(ent, (void *)cmd, qinfo->cmd_size); if (++queue->idx >= queue->qhead->size / 64) { - struct hlist_node *node; - - hlist_for_each(node, &queue->chead) { - chunk = hlist_entry(node, struct command_chunk, - nextchunk); + hlist_for_each_entry(chunk, &queue->chead, nextchunk) { if (chunk == queue->qhead) { continue; } else { |