[linusw-nomadik:ux500-crypto-fb-stab 24/24] drivers/crypto/ux500/hash/hash_alg.h:198:33: error: field 'fallback_req' has incomplete type

kernel test robot lkp at intel.com
Wed Aug 17 01:13:53 PDT 2022


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-crypto-fb-stab
head:   8b966d88af5f34992cc041b8c1a3aa8ff6e166d3
commit: 8b966d88af5f34992cc041b8c1a3aa8ff6e166d3 [24/24] fallback stab
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220817/202208171544.94dYWwp0-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?id=8b966d88af5f34992cc041b8c1a3aa8ff6e166d3
        git remote add linusw-nomadik https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
        git fetch --no-tags linusw-nomadik ux500-crypto-fb-stab
        git checkout 8b966d88af5f34992cc041b8c1a3aa8ff6e166d3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/crypto/ux500/hash/hash_core.c:39:
>> drivers/crypto/ux500/hash/hash_alg.h:198:33: error: field 'fallback_req' has incomplete type
     198 |         struct skcipher_request fallback_req;
         |                                 ^~~~~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c: In function 'ux500_hash_init':
>> drivers/crypto/ux500/hash/hash_core.c:409:58: error: passing argument 2 of 'ahash_request_set_tfm' from incompatible pointer type [-Werror=incompatible-pointer-types]
     409 |         ahash_request_set_tfm(&req_ctx->fallback_req, ctx->fallback_tfm);
         |                                                       ~~~^~~~~~~~~~~~~~
         |                                                          |
         |                                                          struct crypto_skcipher *
   In file included from include/crypto/internal/hash.h:12,
                    from drivers/crypto/ux500/hash/hash_core.c:33:
   include/crypto/hash.h:582:63: note: expected 'struct crypto_ahash *' but argument is of type 'struct crypto_skcipher *'
     582 |                                          struct crypto_ahash *tfm)
         |                                          ~~~~~~~~~~~~~~~~~~~~~^~~
   In file included from include/linux/device.h:15,
                    from include/linux/amba/bus.h:15,
                    from drivers/crypto/ux500/hash/hash_core.c:16:
   drivers/crypto/ux500/hash/hash_core.c: In function 'hash_setkey':
>> drivers/crypto/ux500/hash/hash_core.c:1059:28: error: passing argument 1 of '_dev_err' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1059 |                 dev_err(ctx->device, "shash init error ret=%d\n", ret);
         |                         ~~~^~~~~~~~
         |                            |
         |                            struct hash_device_data *
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/crypto/ux500/hash/hash_core.c:1059:17: note: in expansion of macro 'dev_err'
    1059 |                 dev_err(ctx->device, "shash init error ret=%d\n", ret);
         |                 ^~~~~~~
   include/linux/dev_printk.h:50:36: note: expected 'const struct device *' but argument is of type 'struct hash_device_data *'
      50 | void _dev_err(const struct device *dev, const char *fmt, ...);
         |               ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/crypto/ux500/hash/hash_core.c:1064:28: error: passing argument 1 of '_dev_err' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1064 |                 dev_err(ctx->device, "shash finup error\n");
         |                         ~~~^~~~~~~~
         |                            |
         |                            struct hash_device_data *
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/crypto/ux500/hash/hash_core.c:1064:17: note: in expansion of macro 'dev_err'
    1064 |                 dev_err(ctx->device, "shash finup error\n");
         |                 ^~~~~~~
   include/linux/dev_printk.h:50:36: note: expected 'const struct device *' but argument is of type 'struct hash_device_data *'
      50 | void _dev_err(const struct device *dev, const char *fmt, ...);
         |               ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/crypto/ux500/hash/hash_core.c: In function 'hash_cra_init':
>> drivers/crypto/ux500/hash/hash_core.c:1320:27: error: assignment to 'struct crypto_skcipher *' from incompatible pointer type 'struct crypto_ahash *' [-Werror=incompatible-pointer-types]
    1320 |         ctx->fallback_tfm = crypto_alloc_ahash(crypto_tfm_alg_name(tfm), 0,
         |                           ^
   drivers/crypto/ux500/hash/hash_core.c:1323:28: error: passing argument 1 of '_dev_err' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1323 |                 dev_err(ctx->device, "fallback driver could no be loaded\n");
         |                         ~~~^~~~~~~~
         |                            |
         |                            struct hash_device_data *
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/crypto/ux500/hash/hash_core.c:1323:17: note: in expansion of macro 'dev_err'
    1323 |                 dev_err(ctx->device, "fallback driver could no be loaded\n");
         |                 ^~~~~~~
   include/linux/dev_printk.h:50:36: note: expected 'const struct device *' but argument is of type 'struct hash_device_data *'
      50 | void _dev_err(const struct device *dev, const char *fmt, ...);
         |               ~~~~~~~~~~~~~~~~~~~~~^~~
>> drivers/crypto/ux500/hash/hash_core.c:1329:58: error: passing argument 1 of 'crypto_ahash_reqsize' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1329 |                                  crypto_ahash_reqsize(ctx->fallback_tfm));
         |                                                       ~~~^~~~~~~~~~~~~~
         |                                                          |
         |                                                          struct crypto_skcipher *
   include/crypto/hash.h:413:70: note: expected 'struct crypto_ahash *' but argument is of type 'struct crypto_skcipher *'
     413 | static inline unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm)
         |                                                 ~~~~~~~~~~~~~~~~~~~~~^~~
   In file included from include/linux/string.h:253,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from include/linux/notifier.h:14,
                    from include/linux/clk.h:14,
                    from include/linux/amba/bus.h:14:
>> drivers/crypto/ux500/hash/hash_core.c:1331:79: error: invalid use of undefined type 'struct crypto_skcipher'
    1331 |         memcpy(hash_alg->fbname, crypto_tfm_alg_driver_name(&ctx->fallback_tfm->base),
         |                                                                               ^~
   include/linux/fortify-string.h:376:52: note: in definition of macro '__fortify_memcpy_chk'
     376 |         fortify_memcpy_chk(__fortify_size, p_size, q_size,              \
         |                                                    ^~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1331:9: note: in expansion of macro 'memcpy'
    1331 |         memcpy(hash_alg->fbname, crypto_tfm_alg_driver_name(&ctx->fallback_tfm->base),
         |         ^~~~~~
>> drivers/crypto/ux500/hash/hash_core.c:1331:79: error: invalid use of undefined type 'struct crypto_skcipher'
    1331 |         memcpy(hash_alg->fbname, crypto_tfm_alg_driver_name(&ctx->fallback_tfm->base),
         |                                                                               ^~
   include/linux/fortify-string.h:377:42: note: in definition of macro '__fortify_memcpy_chk'
     377 |                            p_size_field, q_size_field, #op);            \
         |                                          ^~~~~~~~~~~~
   drivers/crypto/ux500/hash/hash_core.c:1331:9: note: in expansion of macro 'memcpy'
    1331 |         memcpy(hash_alg->fbname, crypto_tfm_alg_driver_name(&ctx->fallback_tfm->base),
         |         ^~~~~~
>> drivers/crypto/ux500/hash/hash_core.c:1331:79: error: invalid use of undefined type 'struct crypto_skcipher'
    1331 |         memcpy(hash_alg->fbname, crypto_tfm_alg_driver_name(&ctx->fallback_tfm->base),
         |                                                                               ^~
   include/linux/fortify-string.h:378:30: note: in definition of macro '__fortify_memcpy_chk'
     378 |         __underlying_##op(p, q, __fortify_size);                        \
         |                              ^
   drivers/crypto/ux500/hash/hash_core.c:1331:9: note: in expansion of macro 'memcpy'
    1331 |         memcpy(hash_alg->fbname, crypto_tfm_alg_driver_name(&ctx->fallback_tfm->base),
         |         ^~~~~~
   drivers/crypto/ux500/hash/hash_core.c: In function 'hash_cra_exit':
>> drivers/crypto/ux500/hash/hash_core.c:1347:30: error: passing argument 1 of 'crypto_free_ahash' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1347 |         crypto_free_ahash(ctx->fallback_tfm);
         |                           ~~~^~~~~~~~~~~~~~
         |                              |
         |                              struct crypto_skcipher *
   include/crypto/hash.h:287:59: note: expected 'struct crypto_ahash *' but argument is of type 'struct crypto_skcipher *'
     287 | static inline void crypto_free_ahash(struct crypto_ahash *tfm)
         |                                      ~~~~~~~~~~~~~~~~~~~~~^~~
   drivers/crypto/ux500/hash/hash_core.c: At top level:
>> drivers/crypto/ux500/hash/hash_core.c:1366:65: error: expected expression before ',' token
    1366 |                                 .cra_flags = CRYPTO_ALG_ASYNC | ,
         |                                                                 ^
   cc1: some warnings being treated as errors


vim +/fallback_req +198 drivers/crypto/ux500/hash/hash_alg.h

   175	
   176	/**
   177	 * struct hash_ctx - The request context used for hash calculations.
   178	 * @buffer:	Working buffer for messages going to the hardware.
   179	 * @length:	Length of the part of message hashed so far (floor(N/64) * 64).
   180	 * @index:	Valid number of bytes in buffer (N % 64).
   181	 * @state:	The state of the current calculations.
   182	 * @dma_mode:	Used in special cases (workaround), e.g. need to change to
   183	 *		cpu mode, if not supported/working in dma mode.
   184	 * @hw_initialized: Indicates if hardware is initialized for new operations.
   185	 * @fallback_req: Request struct for invoking the fallback skcipher TFM
   186	 *
   187	 * WARNING: "index" is the  member of the structure, to be sure  that "buffer"
   188	 * is aligned on a 4-bytes boundary. This is highly implementation dependent
   189	 * and MUST be checked whenever this code is ported on new platforms.
   190	 */
   191	struct hash_req_ctx {
   192		u32			buffer[HASH_BLOCK_SIZE / sizeof(u32)];
   193		u64			length;
   194		u8			index;
   195		bool			dma_mode;
   196		bool			hw_initialized;
   197		/* Keep this as the end of the struct for referencing by tail */
 > 198		struct skcipher_request	fallback_req;
   199	};
   200	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



More information about the linux-arm-kernel mailing list