]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
crypto: mediatek - simplify descriptor ring management
authorRyder Lee <ryder.lee@mediatek.com>
Thu, 9 Mar 2017 02:11:15 +0000 (10:11 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Mar 2017 09:58:53 +0000 (17:58 +0800)
commit3d21c41f7e9b51c70d37b316f11cf5cce9dd3311
tree57a1fccf9f7d5e9399a2c8af74f4b9e743795249
parent82445fe995f4b1edf131157a7328796d5aec1efb
crypto: mediatek - simplify descriptor ring management

This patch replaces cmd_pos/res_pos with pointer cmd_next/res_next.

In old code, we must to add one to shift ring to the next segment, and
then use this value to caculate current offset from ring base for each
DMA operation. Now these pointers helps us to simplify flow, so we just
need to move pointers and check the boundaries of ring.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mediatek/mtk-aes.c
drivers/crypto/mediatek/mtk-platform.c
drivers/crypto/mediatek/mtk-platform.h
drivers/crypto/mediatek/mtk-sha.c