Hi Herbert,

Today's linux-next merge of the crypto tree got a conflict in
crypto/ctr.c between commit 69d3150cfc20 ("crypto: ctr - make rfc3686
asynchronous block cipher") from the net-next tree and commit
3e8afe35c36f ("crypto: use ERR_CAST") from the crypto tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    [email protected]

diff --cc crypto/ctr.c
index 1f2997c,095dcb6..0000000
--- a/crypto/ctr.c
+++ b/crypto/ctr.c
@@@ -335,40 -324,18 +335,38 @@@ static void crypto_rfc3686_exit_tfm(str
  
  static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb)
  {
 +      struct crypto_attr_type *algt;
        struct crypto_instance *inst;
        struct crypto_alg *alg;
 +      struct crypto_skcipher_spawn *spawn;
 +      const char *cipher_name;
        int err;
  
 -      err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER);
 +      algt = crypto_get_attr_type(tb);
-       err = PTR_ERR(algt);
 +      if (IS_ERR(algt))
-               return ERR_PTR(err);
++              return ERR_CAST(algt);
 +
 +      if ((algt->type ^ CRYPTO_ALG_TYPE_BLKCIPHER) & algt->mask)
 +              return ERR_PTR(-EINVAL);
 +
 +      cipher_name = crypto_attr_alg_name(tb[1]);
-       err = PTR_ERR(cipher_name);
 +      if (IS_ERR(cipher_name))
-               return ERR_PTR(err);
++              return ERR_CAST(cipher_name);
 +
 +      inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL);
 +      if (!inst)
 +              return ERR_PTR(-ENOMEM);
 +
 +      spawn = crypto_instance_ctx(inst);
 +
 +      crypto_set_skcipher_spawn(spawn, inst);
 +      err = crypto_grab_skcipher(spawn, cipher_name, 0,
 +                                 crypto_requires_sync(algt->type,
 +                                                      algt->mask));
        if (err)
 -              return ERR_PTR(err);
 +              goto err_free_inst;
  
 -      alg = crypto_attr_alg(tb[1], CRYPTO_ALG_TYPE_BLKCIPHER,
 -                                CRYPTO_ALG_TYPE_MASK);
 -      if (IS_ERR(alg))
 -              return ERR_CAST(alg);
 +      alg = crypto_skcipher_spawn_alg(spawn);
  
        /* We only support 16-byte blocks. */
        err = -EINVAL;

Attachment: pgp223AEUclT_.pgp
Description: PGP signature

Reply via email to