From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Greg KH <greg@kroah.com>, Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Oleg Drokin <green@linuxhacker.ru>
Subject: linux-next: manual merge of the staging tree with the crypto tree
Date: Mon, 22 Feb 2016 14:55:25 +1100 [thread overview]
Message-ID: <20160222145525.3d32f803@canb.auug.org.au> (raw)
Hi Greg,
Today's linux-next merge of the staging tree got a conflict in:
drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
between commit:
6dae10001e84 ("staging: lustre: Use ahash")
from the crypto tree and commit:
15d9f5201fc3 ("staging/lustre/libcfs: Adjust NULL comparison codestyle")
3e1f3db1b29b ("staging/lustre: Remove space after cast in cfs_crypto_hash_final()")
from the staging tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell
diff --cc drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
index 94c01aad844b,ec758019bad6..000000000000
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
@@@ -76,10 -69,10 +76,10 @@@ static int cfs_crypto_hash_alloc(unsign
* Skip this function for digest, because we use shash logic at
* cfs_crypto_hash_alloc.
*/
- if (key != NULL)
+ if (key)
- err = crypto_hash_setkey(desc->tfm, key, key_len);
+ err = crypto_ahash_setkey(tfm, key, key_len);
else if ((*type)->cht_key != 0)
- err = crypto_hash_setkey(desc->tfm,
+ err = crypto_ahash_setkey(tfm,
(unsigned char *)&((*type)->cht_key),
(*type)->cht_size);
@@@ -110,17 -99,16 +110,17 @@@ int cfs_crypto_hash_digest(unsigned cha
int err;
const struct cfs_crypto_hash_type *type;
- if (buf == NULL || buf_len == 0 || hash_len == NULL)
+ if (!buf || buf_len == 0 || !hash_len)
return -EINVAL;
- err = cfs_crypto_hash_alloc(alg_id, &type, &hdesc, key, key_len);
+ err = cfs_crypto_hash_alloc(alg_id, &type, &req, key, key_len);
if (err != 0)
return err;
- if (hash == NULL || *hash_len < type->cht_size) {
+ if (!hash || *hash_len < type->cht_size) {
*hash_len = type->cht_size;
- crypto_free_hash(hdesc.tfm);
+ crypto_free_ahash(crypto_ahash_reqtfm(req));
+ ahash_request_free(req);
return -ENOSPC;
}
sg_init_one(&sl, buf, buf_len);
@@@ -183,15 -172,14 +183,15 @@@ int cfs_crypto_hash_final(struct cfs_cr
unsigned char *hash, unsigned int *hash_len)
{
int err;
- int size = crypto_hash_digestsize(((struct hash_desc *)hdesc)->tfm);
+ struct ahash_request *req = (void *)hdesc;
+ int size = crypto_ahash_digestsize(crypto_ahash_reqtfm(req));
- if (hash_len == NULL) {
+ if (!hash_len) {
- crypto_free_hash(((struct hash_desc *)hdesc)->tfm);
- kfree(hdesc);
+ crypto_free_ahash(crypto_ahash_reqtfm(req));
+ ahash_request_free(req);
return 0;
}
- if (hash == NULL || *hash_len < size) {
+ if (!hash || *hash_len < size) {
*hash_len = size;
return -ENOSPC;
}
next reply other threads:[~2016-02-22 3:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 3:55 Stephen Rothwell [this message]
2016-02-23 1:36 ` linux-next: manual merge of the staging tree with the crypto tree Greg KH
-- strict thread matches above, loose matches on Subject: below --
2018-03-15 6:58 Stephen Rothwell
2018-03-15 10:18 ` Greg KH
2018-07-09 4:15 Stephen Rothwell
2018-08-15 23:49 ` Stephen Rothwell
2020-09-18 5:21 Stephen Rothwell
2020-09-18 5:41 ` Herbert Xu
2020-09-18 7:49 ` Greg KH
2020-09-18 7:50 ` Herbert Xu
2020-09-18 8:05 ` Greg KH
2020-09-20 14:01 ` Greg KH
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=20160222145525.3d32f803@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=green@linuxhacker.ru \
--cc=greg@kroah.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@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