diff mbox series

crypto: algif: Fix typing of arguments of af_alg_wait_for_data

Message ID 20240321123217.2578417-1-guozihua@huawei.com (mailing list archive)
State Rejected
Delegated to: Herbert Xu
Headers show
Series crypto: algif: Fix typing of arguments of af_alg_wait_for_data | expand

Commit Message

Guozihua (Scott) March 21, 2024, 12:32 p.m. UTC
For af_alg_wait_for_data, the following checkpatch warning is triggered:

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'

Fix this by chaning unsigned to unsigned int. For argument flags, all
the callers are passing in an int, so make it int as well.

Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero")
Signed-off-by: GUO Zihua <guozihua@huawei.com>
---
 crypto/af_alg.c         | 2 +-
 include/crypto/if_alg.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 68cc9290cabe..4da990160fe9 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -860,7 +860,7 @@  EXPORT_SYMBOL_GPL(af_alg_wmem_wakeup);
  * @min: Set to minimum request size if partial requests are allowed.
  * Return: 0 when writable memory is available, < 0 upon error
  */
-int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min)
+int af_alg_wait_for_data(struct sock *sk, int flags, unsigned int min)
 {
 	DEFINE_WAIT_FUNC(wait, woken_wake_function);
 	struct alg_sock *ask = alg_sk(sk);
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
index 78ecaf5db04c..63b1c2852237 100644
--- a/include/crypto/if_alg.h
+++ b/include/crypto/if_alg.h
@@ -231,7 +231,7 @@  unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset);
 void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
 		      size_t dst_offset);
 void af_alg_wmem_wakeup(struct sock *sk);
-int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min);
+int af_alg_wait_for_data(struct sock *sk, int flags, unsigned int min);
 int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
 		   unsigned int ivsize);
 void af_alg_free_resources(struct af_alg_async_req *areq);