Update some patch for uadk from mainline. To get more information, please visit the homepage: https://github.comp/Linaro/uadk Signed-off-by: Yang Shen <shenyang39@huawei.com>
56 lines
1.6 KiB
Diff
56 lines
1.6 KiB
Diff
From 8d53e4e7194addaf3e9831ba5f197440d0522ad0 Mon Sep 17 00:00:00 2001
|
|
From: Weili Qian <qianweili@huawei.com>
|
|
Date: Sat, 23 Jul 2022 10:48:59 +0800
|
|
Subject: [PATCH 173/183] drv/hpre: change the parameter type
|
|
|
|
Change the function parameter type to '__u32'
|
|
because the input value by callers is not less than 0.
|
|
|
|
Signed-off-by: Weili Qian <qianweili@huawei.com>
|
|
---
|
|
drv/hisi_hpre.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/drv/hisi_hpre.c b/drv/hisi_hpre.c
|
|
index c3c74a0..aea7749 100644
|
|
--- a/drv/hisi_hpre.c
|
|
+++ b/drv/hisi_hpre.c
|
|
@@ -100,7 +100,7 @@ struct hisi_hpre_ctx {
|
|
struct wd_ctx_config_internal config;
|
|
};
|
|
|
|
-static bool is_hpre_bin_fmt(char *dst, const char *src, int dsz, int bsz)
|
|
+static bool is_hpre_bin_fmt(char *dst, const char *src, __u32 dsz, __u32 bsz)
|
|
{
|
|
const char *temp = src + dsz;
|
|
int lens = bsz - dsz;
|
|
@@ -127,7 +127,7 @@ static int crypto_bin_to_hpre_bin(char *dst, const char *src,
|
|
int i = d_size - 1;
|
|
int j;
|
|
|
|
- if (!dst || !src || b_size <= 0 || d_size <= 0) {
|
|
+ if (!dst || !src || !b_size || !d_size) {
|
|
WD_ERR("invalid: %s trans to hpre bin parameters err!\n", p_name);
|
|
return -WD_EINVAL;
|
|
}
|
|
@@ -150,14 +150,14 @@ static int crypto_bin_to_hpre_bin(char *dst, const char *src,
|
|
return WD_SUCCESS;
|
|
}
|
|
|
|
-static int hpre_bin_to_crypto_bin(char *dst, const char *src, int b_size,
|
|
+static int hpre_bin_to_crypto_bin(char *dst, const char *src, __u32 b_size,
|
|
const char *p_name)
|
|
{
|
|
int i, cnt;
|
|
int j = 0;
|
|
int k = 0;
|
|
|
|
- if (!dst || !src || b_size <= 0) {
|
|
+ if (!dst || !src || !b_size) {
|
|
WD_ERR("invalid: %s trans to crypto bin parameters err!\n", p_name);
|
|
return 0;
|
|
}
|
|
--
|
|
2.27.0
|
|
|