Skip to content

Commit f97a3d7

Browse files
Yang Shenherbertx
authored andcommitted
crypto: hisilicon/zip - move some private macros from 'zip.h' to 'zip_crypto.c'
Some macros which are defined in 'zip.h' are related to the struct 'hisi_zip_sqe' and are only used in 'zip_crypto.c'. So move them from 'zip.h' to 'zip_crypto.c'. Signed-off-by: Yang Shen <shenyang39@huawei.com> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent eb175f7 commit f97a3d7

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎drivers/crypto/hisilicon/zip/zip.h‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@
99
#include <linux/list.h>
1010
#include "../qm.h"
1111

12-
/* hisi_zip_sqe dw3 */
13-
#define HZIP_BD_STATUS_M GENMASK(7, 0)
14-
/* hisi_zip_sqe dw7 */
15-
#define HZIP_IN_SGE_DATA_OFFSET_M GENMASK(23, 0)
16-
/* hisi_zip_sqe dw8 */
17-
#define HZIP_OUT_SGE_DATA_OFFSET_M GENMASK(23, 0)
18-
/* hisi_zip_sqe dw9 */
19-
#define HZIP_REQ_TYPE_M GENMASK(7, 0)
20-
#define HZIP_ALG_TYPE_ZLIB 0x02
21-
#define HZIP_ALG_TYPE_GZIP 0x03
22-
#define HZIP_BUF_TYPE_M GENMASK(11, 8)
23-
#define HZIP_PBUFFER 0x0
24-
#define HZIP_SGL 0x1
25-
2612
enum hisi_zip_error_type {
2713
/* negative compression */
2814
HZIP_NC_ERR = 0x0d,

‎drivers/crypto/hisilicon/zip/zip_crypto.c‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66
#include <linux/scatterlist.h>
77
#include "zip.h"
88

9+
/* hisi_zip_sqe dw3 */
10+
#define HZIP_BD_STATUS_M GENMASK(7, 0)
11+
/* hisi_zip_sqe dw7 */
12+
#define HZIP_IN_SGE_DATA_OFFSET_M GENMASK(23, 0)
13+
/* hisi_zip_sqe dw8 */
14+
#define HZIP_OUT_SGE_DATA_OFFSET_M GENMASK(23, 0)
15+
/* hisi_zip_sqe dw9 */
16+
#define HZIP_REQ_TYPE_M GENMASK(7, 0)
17+
#define HZIP_ALG_TYPE_ZLIB 0x02
18+
#define HZIP_ALG_TYPE_GZIP 0x03
19+
#define HZIP_BUF_TYPE_M GENMASK(11, 8)
20+
#define HZIP_PBUFFER 0x0
21+
#define HZIP_SGL 0x1
22+
923
#define HZIP_ZLIB_HEAD_SIZE 2
1024
#define HZIP_GZIP_HEAD_SIZE 10
1125

0 commit comments

Comments
 (0)