1. Feb 14, 2023
    • Herbert Xu's avatar
      crypto: crypto4xx - Call dma_unmap_page when done · bcdda430
      Herbert Xu authored
      In crypto4xx_cipher_done, we should be unmapping the dst page, not
      mapping it.
      
      This was flagged by a sparse warning about the unused addr variable.
      While we're at it, also fix a sparse warning regarding the unused
      ctx variable in crypto4xx_ahash_done (by actually using it).
      
      Fixes: 049359d6
      
       ("crypto: amcc - Add crypt4xx driver")
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Tested-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      bcdda430
    • Alexander Lobakin's avatar
      crypto: octeontx2 - Fix objects shared between several modules · 72bc4e71
      Alexander Lobakin authored
      cn10k_cpt.o, otx2_cptlf.o and otx2_cpt_mbox_common.o are linked
      into both rvu_cptpf and rvu_cptvf modules:
      
      > scripts/Makefile.build:252: ./drivers/crypto/marvell/octeontx2/Makefile:
      > cn10k_cpt.o is added to multiple modules: rvu_cptpf rvu_cptvf
      > scripts/Makefile.build:252: ./drivers/crypto/marvell/octeontx2/Makefile:
      > otx2_cptlf.o is added to multiple modules: rvu_cptpf rvu_cptvf
      > scripts/Makefile.build:252: ./drivers/crypto/marvell/octeontx2/Makefile:
      > otx2_cpt_mbox_common.o is added to multiple modules: rvu_cptpf rvu_cptvf
      
      Despite they're build under the same Kconfig option
      (CONFIG_CRYPTO_DEV_OCTEONTX2_CPT), it's better do link the common
      code into a standalone module and export the shared functions. Under
      certain circumstances, this can lead to the same situation as fixed
      by commit 637a642f ("zstd: Fixing mixed module-builtin objects").
      Plus, those three common object files are relatively big to duplicate
      them several times.
      
      Int...
      72bc4e71
    • Herbert Xu's avatar
      crypto: nx - Fix sparse warnings · 6084466e
      Herbert Xu authored
      
      
      This driver generates a large number of sparse warnings due to
      two issues.
      
      First of all the structure nx842_devdata is defined inline causing
      the __rcu tag to be added to all users of it.  This easily fixed by
      splitting up the struct definition.
      
      The second issue is with kdoc markers being incomplete.  The trivial
      case of nx842_exec_vas has been fixed, while the other incomplete
      documentation has simply been downgraded to normal C comments.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      6084466e
    • Herbert Xu's avatar
      crypto: ecc - Silence sparse warning · 5072b1c2
      Herbert Xu authored
      
      
      Rewrite the bitwise operations to silence the sparse warnings:
      
        CHECK   ../crypto/ecc.c
      ../crypto/ecc.c:1387:39: warning: dubious: !x | y
      ../crypto/ecc.c:1397:47: warning: dubious: !x | y
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Reviewed-by: default avatarVitaly Chikunov <vt@altlinux.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5072b1c2
  2. Feb 13, 2023