[PATCH] [BigDipperV5R9][UADK] uadk: fix the compilation failure of wd_alg.h
From: Weili Qian <qianweili@huawei.com> Fix the compilation failure of wd_alg.h, error log likes: wd_alg.h:121:9: error: unknown type name ‘__u8’. And improve code portability by including linux/types.h instead of asm/types.h. Upstream: YES Feature or Bugfix:Bugfix AR: AR20230722287656 DTS: DTS2026012302441 Signed-off-by: Weili Qian <qianweili@huawei.com> --- drv/hisi_comp.c | 2 +- drv/hisi_comp_huf.c | 2 +- drv/hisi_comp_huf.h | 2 +- include/drv/wd_agg_drv.h | 2 +- include/drv/wd_cipher_drv.h | 2 +- include/drv/wd_comp_drv.h | 2 +- include/drv/wd_dh_drv.h | 2 +- include/drv/wd_ecc_drv.h | 2 +- include/drv/wd_join_gather_drv.h | 2 +- include/drv/wd_rsa_drv.h | 2 +- include/drv/wd_udma_drv.h | 2 +- include/wd.h | 6 ++---- include/wd_agg.h | 3 ++- include/wd_alg.h | 1 + include/wd_cipher.h | 3 ++- include/wd_dae.h | 3 ++- include/wd_join_gather.h | 3 ++- include/wd_sched.h | 2 +- include/wd_util.h | 2 +- include/wd_zlibwrapper.h | 2 +- 20 files changed, 25 insertions(+), 22 deletions(-) diff --git a/drv/hisi_comp.c b/drv/hisi_comp.c index 6758c02..7c449e0 100644 --- a/drv/hisi_comp.c +++ b/drv/hisi_comp.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 /* Copyright 2020-2021 Huawei Technologies Co.,Ltd. All rights reserved. */ -#include <asm/types.h> +#include <linux/types.h> #include "drv/wd_comp_drv.h" #include "drv/hisi_comp_huf.h" #include "hisi_qm_udrv.h" diff --git a/drv/hisi_comp_huf.c b/drv/hisi_comp_huf.c index 161fee4..c64c418 100644 --- a/drv/hisi_comp_huf.c +++ b/drv/hisi_comp_huf.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 /* Copyright 2025 Huawei Technologies Co.,Ltd. All rights reserved. */ -#include <asm/types.h> +#include <linux/types.h> #include "drv/hisi_comp_huf.h" #include "wd_util.h" diff --git a/drv/hisi_comp_huf.h b/drv/hisi_comp_huf.h index 6585b7a..dde0ff4 100644 --- a/drv/hisi_comp_huf.h +++ b/drv/hisi_comp_huf.h @@ -4,7 +4,7 @@ #ifndef __HISI_COMP_HUF_H #define __HISI_COMP_HUF_H -#include <asm/types.h> +#include <linux/types.h> #ifdef __cplusplus extern "C" { diff --git a/include/drv/wd_agg_drv.h b/include/drv/wd_agg_drv.h index 978c2d3..b26b25d 100644 --- a/include/drv/wd_agg_drv.h +++ b/include/drv/wd_agg_drv.h @@ -6,7 +6,7 @@ #ifndef __WD_AGG_DRV_H #define __WD_AGG_DRV_H -#include <asm/types.h> +#include <linux/types.h> #include "wd_agg.h" #include "wd_util.h" diff --git a/include/drv/wd_cipher_drv.h b/include/drv/wd_cipher_drv.h index c0be0c3..458a8d8 100644 --- a/include/drv/wd_cipher_drv.h +++ b/include/drv/wd_cipher_drv.h @@ -4,7 +4,7 @@ #ifndef __WD_CIPHER_DRV_H #define __WD_CIPHER_DRV_H -#include <asm/types.h> +#include <linux/types.h> #include "../wd_cipher.h" #include "../wd_util.h" diff --git a/include/drv/wd_comp_drv.h b/include/drv/wd_comp_drv.h index 95f7fb7..2311d79 100644 --- a/include/drv/wd_comp_drv.h +++ b/include/drv/wd_comp_drv.h @@ -5,7 +5,7 @@ #define __WD_COMP_DRV_H #include <pthread.h> -#include <asm/types.h> +#include <linux/types.h> #include "../wd_comp.h" #include "../wd_util.h" diff --git a/include/drv/wd_dh_drv.h b/include/drv/wd_dh_drv.h index d2a6157..a46aa90 100644 --- a/include/drv/wd_dh_drv.h +++ b/include/drv/wd_dh_drv.h @@ -4,7 +4,7 @@ #ifndef __WD_DH_DRV_H #define __WD_DH_DRV_H -#include <asm/types.h> +#include <linux/types.h> #include "../wd_dh.h" #include "../wd_util.h" diff --git a/include/drv/wd_ecc_drv.h b/include/drv/wd_ecc_drv.h index b123a9b..48c422f 100644 --- a/include/drv/wd_ecc_drv.h +++ b/include/drv/wd_ecc_drv.h @@ -5,7 +5,7 @@ #define __WD_ECC_DRV_H #include <stdint.h> -#include <asm/types.h> +#include <linux/types.h> #include "../wd_ecc.h" #include "../wd_util.h" diff --git a/include/drv/wd_join_gather_drv.h b/include/drv/wd_join_gather_drv.h index 80fb932..dbf4ee7 100644 --- a/include/drv/wd_join_gather_drv.h +++ b/include/drv/wd_join_gather_drv.h @@ -6,7 +6,7 @@ #ifndef __WD_JOIN_GATHER_DRV_H #define __WD_JOIN_GATHER_DRV_H -#include <asm/types.h> +#include <linux/types.h> #include "wd_join_gather.h" #include "wd_util.h" diff --git a/include/drv/wd_rsa_drv.h b/include/drv/wd_rsa_drv.h index c12f3e0..728abdf 100644 --- a/include/drv/wd_rsa_drv.h +++ b/include/drv/wd_rsa_drv.h @@ -3,7 +3,7 @@ #ifndef __WD_RSA_DRV_H #define __WD_RSA_DRV_H -#include <asm/types.h> +#include <linux/types.h> #include "../wd_rsa.h" #include "../wd_util.h" diff --git a/include/drv/wd_udma_drv.h b/include/drv/wd_udma_drv.h index c8028f7..8c5edea 100644 --- a/include/drv/wd_udma_drv.h +++ b/include/drv/wd_udma_drv.h @@ -4,7 +4,7 @@ #ifndef __WD_UDMA_DRV_H #define __WD_UDMA_DRV_H -#include <asm/types.h> +#include <linux/types.h> #include "../wd_udma.h" #include "../wd_util.h" diff --git a/include/wd.h b/include/wd.h index 7e92e41..a468047 100644 --- a/include/wd.h +++ b/include/wd.h @@ -15,7 +15,8 @@ #include <string.h> #include <syslog.h> #include <unistd.h> -#include <asm/types.h> +#include <linux/types.h> + #include "uacce.h" #ifdef __cplusplus @@ -33,9 +34,6 @@ extern "C" { #define CRYPTO_MAX_ALG_NAME 128 #define NUMA_NO_NODE (-1) -typedef unsigned char __u8; -typedef unsigned int __u32; -typedef unsigned long long __u64; /* Required compiler attributes */ #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) diff --git a/include/wd_agg.h b/include/wd_agg.h index fed08c5..b35c8c2 100644 --- a/include/wd_agg.h +++ b/include/wd_agg.h @@ -7,7 +7,8 @@ #define __WD_AGG_H #include <dlfcn.h> -#include <asm/types.h> +#include <linux/types.h> + #include "wd_dae.h" #ifdef __cplusplus diff --git a/include/wd_alg.h b/include/wd_alg.h index 7a3ae5f..18503ca 100644 --- a/include/wd_alg.h +++ b/include/wd_alg.h @@ -10,6 +10,7 @@ #include <stdbool.h> #include <stdint.h> #include <unistd.h> +#include <linux/types.h> #ifdef __cplusplus extern "C" { diff --git a/include/wd_cipher.h b/include/wd_cipher.h index 1d82eac..a6f8be1 100644 --- a/include/wd_cipher.h +++ b/include/wd_cipher.h @@ -8,7 +8,8 @@ #define __WD_CIPHER_H #include <dlfcn.h> -#include <asm/types.h> +#include <linux/types.h> + #include "wd_alg_common.h" #ifdef __cplusplus diff --git a/include/wd_dae.h b/include/wd_dae.h index 64f17dc..3d7463e 100644 --- a/include/wd_dae.h +++ b/include/wd_dae.h @@ -8,7 +8,8 @@ #include <dlfcn.h> #include <stdbool.h> -#include <asm/types.h> +#include <linux/types.h> + #include "wd_alg_common.h" #include "wd.h" diff --git a/include/wd_join_gather.h b/include/wd_join_gather.h index 4962ee3..44588b2 100644 --- a/include/wd_join_gather.h +++ b/include/wd_join_gather.h @@ -7,7 +7,8 @@ #define __WD_JOIN_GATHER_H #include <dlfcn.h> -#include <asm/types.h> +#include <linux/types.h> + #include "wd_dae.h" #ifdef __cplusplus diff --git a/include/wd_sched.h b/include/wd_sched.h index 949396e..5baecd3 100644 --- a/include/wd_sched.h +++ b/include/wd_sched.h @@ -6,7 +6,7 @@ #ifndef SCHED_SAMPLE_h #define SCHED_SAMPLE_h -#include <asm/types.h> +#include <linux/types.h> #include "wd_alg_common.h" #ifdef __cplusplus diff --git a/include/wd_util.h b/include/wd_util.h index a337284..2abceec 100644 --- a/include/wd_util.h +++ b/include/wd_util.h @@ -11,7 +11,7 @@ #include <stdbool.h> #include <sys/ipc.h> #include <sys/shm.h> -#include <asm/types.h> +#include <linux/types.h> #include "wd.h" #include "wd_sched.h" diff --git a/include/wd_zlibwrapper.h b/include/wd_zlibwrapper.h index 978d1ed..80ba08f 100644 --- a/include/wd_zlibwrapper.h +++ b/include/wd_zlibwrapper.h @@ -6,7 +6,7 @@ #ifndef UADK_ZLIBWRAPPER_H #define UADK_ZLIBWRAPPER_H -#include <asm/types.h> +#include <linux/types.h> /* * These APIs are used to replace the ZLIB library. So if you don't use them. -- 2.33.0
participants (1)
-
ZongYu Wu