All of lore.kernel.org
 help / color / mirror / Atom feed
From: GUO Zihua <guozihua@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-crypto@vger.kernel.org>
Subject: [PATCH] crypto: algif: Fix typing of arguments of af_alg_wait_for_data
Date: Thu, 21 Mar 2024 12:32:17 +0000	[thread overview]
Message-ID: <20240321123217.2578417-1-guozihua@huawei.com> (raw)

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 --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);
-- 
2.34.1


                 reply	other threads:[~2024-03-21 12:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240321123217.2578417-1-guozihua@huawei.com \
    --to=guozihua@huawei.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.