From 859274970f0afad7a6ea8b28b5401917264dca18 Mon Sep 17 00:00:00 2001 From: Weili Qian Date: Wed, 11 Feb 2026 17:29:56 +0800 Subject: [PATCH] uadk: fix the compilation failure of wd_alg.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Weili Qian --- 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 cf8d31519..a6b294740 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 +#include #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 161fee41f..c64c4180a 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 +#include #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 6585b7a1a..dde0ff4e6 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 +#include #ifdef __cplusplus extern "C" { diff --git a/include/drv/wd_agg_drv.h b/include/drv/wd_agg_drv.h index 978c2d34e..b26b25da3 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 +#include #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 c0be0c3bf..458a8d8d7 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 +#include #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 95f7fb77d..2311d79fb 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 -#include +#include #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 d2a61575a..a46aa9054 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 +#include #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 b123a9b1a..48c422fc4 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 -#include +#include #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 80fb9322d..dbf4ee777 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 +#include #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 c12f3e0bc..728abdf05 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 +#include #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 c8028f79f..8c5edea0e 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 +#include #include "../wd_udma.h" #include "../wd_util.h" diff --git a/include/wd.h b/include/wd.h index 7e92e41fa..a4680478b 100644 --- a/include/wd.h +++ b/include/wd.h @@ -15,7 +15,8 @@ #include #include #include -#include +#include + #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 fed08c506..b35c8c2f7 100644 --- a/include/wd_agg.h +++ b/include/wd_agg.h @@ -7,7 +7,8 @@ #define __WD_AGG_H #include -#include +#include + #include "wd_dae.h" #ifdef __cplusplus diff --git a/include/wd_alg.h b/include/wd_alg.h index 7a3ae5f3a..18503ca83 100644 --- a/include/wd_alg.h +++ b/include/wd_alg.h @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/wd_cipher.h b/include/wd_cipher.h index 1d82eac23..a6f8be12b 100644 --- a/include/wd_cipher.h +++ b/include/wd_cipher.h @@ -8,7 +8,8 @@ #define __WD_CIPHER_H #include -#include +#include + #include "wd_alg_common.h" #ifdef __cplusplus diff --git a/include/wd_dae.h b/include/wd_dae.h index 64f17dc4e..3d7463ef7 100644 --- a/include/wd_dae.h +++ b/include/wd_dae.h @@ -8,7 +8,8 @@ #include #include -#include +#include + #include "wd_alg_common.h" #include "wd.h" diff --git a/include/wd_join_gather.h b/include/wd_join_gather.h index 4962ee351..44588b272 100644 --- a/include/wd_join_gather.h +++ b/include/wd_join_gather.h @@ -7,7 +7,8 @@ #define __WD_JOIN_GATHER_H #include -#include +#include + #include "wd_dae.h" #ifdef __cplusplus diff --git a/include/wd_sched.h b/include/wd_sched.h index 949396ed3..5baecd3f1 100644 --- a/include/wd_sched.h +++ b/include/wd_sched.h @@ -6,7 +6,7 @@ #ifndef SCHED_SAMPLE_h #define SCHED_SAMPLE_h -#include +#include #include "wd_alg_common.h" #ifdef __cplusplus diff --git a/include/wd_util.h b/include/wd_util.h index a337284f6..2abceec27 100644 --- a/include/wd_util.h +++ b/include/wd_util.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include "wd.h" #include "wd_sched.h" diff --git a/include/wd_zlibwrapper.h b/include/wd_zlibwrapper.h index 978d1ed2c..80ba08f66 100644 --- a/include/wd_zlibwrapper.h +++ b/include/wd_zlibwrapper.h @@ -6,7 +6,7 @@ #ifndef UADK_ZLIBWRAPPER_H #define UADK_ZLIBWRAPPER_H -#include +#include /* * These APIs are used to replace the ZLIB library. So if you don't use them.