From: Corentin Labbe <clabbe@baylibre.com>
To: chohnstaedt@innominate.com, davem@davemloft.net,
herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH 04/11] crypto: ixp4xx: convert unsigned to unsigned int
Date: Wed, 5 May 2021 20:26:11 +0000 [thread overview]
Message-ID: <20210505202618.2663889-5-clabbe@baylibre.com> (raw)
In-Reply-To: <20210505202618.2663889-1-clabbe@baylibre.com>
Fixes all issues reported by checkpatch about "unsigned", lets convert
them to unsigned int.
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
drivers/crypto/ixp4xx_crypto.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 8bbf2ead6e79..17de9e60adad 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -136,7 +136,7 @@ struct crypt_ctl {
u32 crypto_ctx; /* NPE Crypto Param structure address */
/* Used by Host: 4*4 bytes*/
- unsigned ctl_flags;
+ unsigned int ctl_flags;
union {
struct skcipher_request *ablk_req;
struct aead_request *aead_req;
@@ -184,7 +184,7 @@ struct ixp_ctx {
u8 enckey[MAX_KEYLEN];
u8 salt[MAX_IVLEN];
u8 nonce[CTR_RFC3686_NONCE_SIZE];
- unsigned salted;
+ unsigned int salted;
atomic_t configuring;
struct completion completion;
struct crypto_skcipher *fallback_tfm;
@@ -695,8 +695,8 @@ static int register_chain_var(struct crypto_tfm *tfm, u8 xpad, u32 target,
return 0;
}
-static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned authsize,
- const u8 *key, int key_len, unsigned digest_len)
+static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned int authsize,
+ const u8 *key, int key_len, unsigned int digest_len)
{
u32 itarget, otarget, npe_ctx_addr;
unsigned char *cinfo;
@@ -823,12 +823,12 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt,
}
static struct buffer_desc *chainup_buffers(struct device *dev,
- struct scatterlist *sg, unsigned nbytes,
+ struct scatterlist *sg, unsigned int nbytes,
struct buffer_desc *buf, gfp_t flags,
enum dma_data_direction dir)
{
for (; nbytes > 0; sg = sg_next(sg)) {
- unsigned len = min(nbytes, sg->length);
+ unsigned int len = min(nbytes, sg->length);
struct buffer_desc *next_buf;
dma_addr_t next_buf_phys;
void *ptr;
@@ -930,7 +930,7 @@ static int ablk_perform(struct skcipher_request *req, int encrypt)
{
struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
struct ixp_ctx *ctx = crypto_skcipher_ctx(tfm);
- unsigned ivsize = crypto_skcipher_ivsize(tfm);
+ unsigned int ivsize = crypto_skcipher_ivsize(tfm);
struct ix_sa_dir *dir;
struct crypt_ctl *crypt;
unsigned int nbytes = req->cryptlen;
@@ -1045,8 +1045,8 @@ static int aead_perform(struct aead_request *req, int encrypt,
{
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
struct ixp_ctx *ctx = crypto_aead_ctx(tfm);
- unsigned ivsize = crypto_aead_ivsize(tfm);
- unsigned authsize = crypto_aead_authsize(tfm);
+ unsigned int ivsize = crypto_aead_ivsize(tfm);
+ unsigned int authsize = crypto_aead_authsize(tfm);
struct ix_sa_dir *dir;
struct crypt_ctl *crypt;
unsigned int cryptlen;
@@ -1157,7 +1157,7 @@ static int aead_perform(struct aead_request *req, int encrypt,
static int aead_setup(struct crypto_aead *tfm, unsigned int authsize)
{
struct ixp_ctx *ctx = crypto_aead_ctx(tfm);
- unsigned digest_len = crypto_aead_maxauthsize(tfm);
+ unsigned int digest_len = crypto_aead_maxauthsize(tfm);
int ret;
if (!ctx->enckey_len && !ctx->authkey_len)
--
2.26.3
next prev parent reply other threads:[~2021-05-05 20:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 20:26 [PATCH 00/11] crypto: start to fix ixp4xx Corentin Labbe
2021-05-05 20:26 ` [PATCH 01/11] crypto: ixp4xx: dma_unmap the correct address Corentin Labbe
2021-05-05 20:26 ` [PATCH 02/11] crypto: ixp4xx: update IV after requests Corentin Labbe
2021-05-05 20:26 ` [PATCH 03/11] crypto: ixp4xx: fallback when having more than one SG Corentin Labbe
2021-05-05 20:26 ` Corentin Labbe [this message]
2021-05-05 20:26 ` [PATCH 05/11] crypto: ixp4xx: convert all printk to dev_xxx Corentin Labbe
2021-05-05 20:26 ` [PATCH 06/11] crypto: ixp4xx: whitespace fixes Corentin Labbe
2021-05-05 20:26 ` [PATCH 07/11] crypto: ixp4xx: Do not initialize static to NULL Corentin Labbe
2021-05-05 20:26 ` [PATCH 08/11] crypto: ixp4xx: remove brackets from single statement Corentin Labbe
2021-05-05 20:26 ` [PATCH 09/11] crypto: ixp4xx: Correct functions alignment Corentin Labbe
2021-05-05 20:26 ` [PATCH 10/11] MAINTAINERS: add ixp4xx_crypto to the right arch list Corentin Labbe
2021-05-05 20:26 ` [PATCH 11/11] MAINTAINERS: add myself as maintainer of ixp4xx_crypto Corentin Labbe
2021-05-14 11:35 ` [PATCH 00/11] crypto: start to fix ixp4xx Herbert Xu
2021-05-17 23:53 ` Linus Walleij
2021-05-18 1:19 ` Herbert Xu
2021-05-18 21:36 ` Linus Walleij
2021-05-19 0:51 ` Herbert Xu
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=20210505202618.2663889-5-clabbe@baylibre.com \
--to=clabbe@baylibre.com \
--cc=chohnstaedt@innominate.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).