ta: crypto_perf: fix build error on type mismatch

Fix build error in crypto_perf TA as shown in below build trace
messages when built for a 64bit target:

ta_crypto_perf.c: In function 'cmd_asym_process_rsa_ecc':
ta_crypto_perf.c:772:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, uint32_t,  void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, unsigned int,  void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, size_t,  void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, long unsigned int,  void *, long unsigned int *)'} [-Wincompatible-pointer-types]
  772 |                         do_asym = TEE_AsymmetricEncrypt;
      |                                 ^
ta_crypto_perf.c:774:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, uint32_t,  void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, unsigned int,  void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, size_t,  void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, long unsigned int,  void *, long unsigned int *)'} [-Wincompatible-pointer-types]
  774 |                         do_asym = TEE_AsymmetricDecrypt;
      |                                 ^
ta_crypto_perf.c:776:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, uint32_t,  void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, unsigned int,  void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, size_t,  void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, long unsigned int,  void *, long unsigned int *)'} [-Wincompatible-pointer-types]
  776 |                         do_asym = TEE_AsymmetricSignDigest;
      |                                 ^
ta_crypto_perf.c:784:64: warning: passing argument 7 of 'do_asym' from incompatible pointer type [-Wincompatible-pointer-types]
  784 |                                       params[2].memref.buffer, &dummy_size);
      |                                                                ^~~~~~~~~~~
      |                                                                |
      |                                                                size_t * {aka long unsigned int *}
ta_crypto_perf.c:784:64: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'size_t *' {aka 'long unsigned int *'}
ta_crypto_perf.c: At top level:

Fixes: 14a2b2ac3db4 ("ta: crypto_perf: add asymmetric crypto perf tests")
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
1 file changed
tree: d077198c86fcf21b5e155feffc032e59dbc6cc93
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE.md
  11. Makefile
  12. README.md
  13. typedefs.checkpatch
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.

// OP-TEE core maintainers