1. 02 4月, 2021 2 次提交
  2. 26 3月, 2021 38 次提交
    • A
      crypto: nx - fix incorrect kernel-doc comment syntax in files · 10cb823b
      Aditya Srivastava 提交于
      The opening comment mark '/**' is used for highlighting the beginning of
      kernel-doc comments.
      There are certain files in drivers/crypto/nx, which follow this syntax,
      but the content inside does not comply with kernel-doc.
      Such lines were probably not meant for kernel-doc parsing, but are parsed
      due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
      causes unexpected warnings from kernel-doc.
      
      E.g., presence of kernel-doc like comment in the header lines for
      drivers/crypto/nx/nx-sha256.c at header causes these warnings:
      "warning: Function parameter or member 'tfm' not described in 'nx_crypto_ctx_sha256_init'"
      "warning: expecting prototype for SHA(). Prototype was for nx_crypto_ctx_sha256_init() instead"
      
      Similarly for other files too.
      
      Provide a simple fix by replacing such occurrences with general comment
      format, i.e. '/*', to prevent kernel-doc from parsing it.
      Signed-off-by: NAditya Srivastava <yashsri421@gmail.com>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      10cb823b
    • A
      crypto: ux500 - fix incorrect kernel-doc comment syntax · ce668da5
      Aditya Srivastava 提交于
      The opening comment mark '/**' is used for highlighting the beginning of
      kernel-doc comments.
      There are certain files in drivers/crypto/ux500, which follow this syntax,
      but the content inside does not comply with kernel-doc.
      Such lines were probably not meant for kernel-doc parsing, but are parsed
      due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
      causes unexpected warnings from kernel-doc.
      
      E.g., presence of kernel-doc like comment in the header lines for
      drivers/crypto/ux500/cryp/cryp.h at header causes this warning:
      
      "warning: expecting prototype for ST(). Prototype was for _CRYP_H_() instead"
      
      Similarly for other files too.
      
      Provide a simple fix by replacing such occurrences with general comment
      format, i.e. '/*', to prevent kernel-doc from parsing it.
      Signed-off-by: NAditya Srivastava <yashsri421@gmail.com>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      ce668da5
    • A
      crypto: amcc - fix incorrect kernel-doc comment syntax in files · 73f04d3d
      Aditya Srivastava 提交于
      The opening comment mark '/**' is used for highlighting the beginning of
      kernel-doc comments.
      There are certain files in drivers/crypto/amcc, which follow this syntax,
      but the content inside does not comply with kernel-doc.
      Such lines were probably not meant for kernel-doc parsing, but are parsed
      due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
      causes unexpected warnings from kernel-doc.
      
      E.g., presence of kernel-doc like comment in
      drivers/crypto/amcc/crypto4xx_alg.c at header, and some other lines,
      causes these warnings by kernel-doc:
      
      "warning: expecting prototype for AMCC SoC PPC4xx Crypto Driver(). Prototype was for set_dynamic_sa_command_0() instead"
      "warning: Function parameter or member 'dir' not described in 'set_dynamic_sa_command_0'"
      etc..
      
      Provide a simple fix by replacing such occurrences with general comment
      format, i.e. '/*', to prevent kernel-doc from parsing it.
      Signed-off-by: NAditya Srivastava <yashsri421@gmail.com>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      73f04d3d
    • A
      crypto: vmx - fix incorrect kernel-doc comment syntax in files · dbb153c0
      Aditya Srivastava 提交于
      The opening comment mark '/**' is used for highlighting the beginning of
      kernel-doc comments.
      There are certain files in drivers/crypto/vmx, which follow this syntax,
      but the content inside does not comply with kernel-doc.
      Such lines were probably not meant for kernel-doc parsing, but are parsed
      due to the presence of kernel-doc like comment syntax(i.e, '/**'), which
      causes unexpected warnings from kernel-doc.
      
      E.g., presence of kernel-doc like comment in the header line for
      drivers/crypto/vmx/vmx.c causes this warning by kernel-doc:
      
      "warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead"
      
      Similarly for other files too.
      
      Provide a simple fix by replacing such occurrences with general comment
      format, i.e. '/*', to prevent kernel-doc from parsing it.
      Signed-off-by: NAditya Srivastava <yashsri421@gmail.com>
      Reviewed-by: NDaniel Axtens <dja@axtens.net>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      dbb153c0
    • W
      crypto: hisilicon/qm - add queue isolation support for Kunpeng930 · 8bbecfb4
      Weili Qian 提交于
      Kunpeng930 supports doorbell isolation to ensure that each queue
      has an independent doorbell address space.
      Signed-off-by: NWeili Qian <qianweili@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8bbecfb4
    • W
      crypto: hisilicon/qm - set the number of queues for function · 6250383a
      Weili Qian 提交于
      Kunpeng930 supports queue doorbell isolation.
      When doorbell isolation is enabled, it supports to obtain the
      maximum number of queues of one function from hardware register.
      Otherwise, the 'max_qp_num' is the total number of queues.
      
      When assigning queues to VF, it is necessary to ensure that the number
      of VF queues does not exceed 'max_qp_num'.
      Signed-off-by: NWeili Qian <qianweili@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      6250383a
    • W
      crypto: hisilicon/qm - move 'CURRENT_QM' code to qm.c · c4392b46
      Weili Qian 提交于
      Since the code related to 'CURRENT_QM' debugfs is exactly same in
      sec/hpre/zip driver, move 'CURRENT_QM' to qm.c to reduce duplicate code.
      Signed-off-by: NWeili Qian <qianweili@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c4392b46
    • W
      crypto: hisilicon/qm - set the total number of queues · 45bb26d9
      Weili Qian 提交于
      Move the configuration of the total number of queues 'ctrl_qp_num'
      from sec2/hpre/zip to qm.c. And get the total number of queues
      from the hardware register for Kunpeng930.
      Signed-off-by: NWeili Qian <qianweili@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      45bb26d9
    • H
      crypto: hisilicon/hpre - fix Kconfig · 7d156979
      Hui Tang 提交于
      hpre select 'CRYPTO_ECDH' and 'CRYPTO_CURVE25519'.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7d156979
    • H
      crypto: hisilicon/hpre - fix "hpre_ctx_init" resource leak · 670fefb9
      Hui Tang 提交于
      When calling "hpre_ctx_set" fails, stop and put qp,
      otherwise will leak qp resource.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      670fefb9
    • H
      crypto: hisilicon - fix the check on dma address · a9214b0b
      Hui Tang 提交于
      System may be able to get physical address of zero if not reserved by
      firmware.
      
      The dma address obtained by 'dma_alloc_coherent' is valid, since already
      checking cpu va before, so do not check again.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a9214b0b
    • H
      crypto: hisilicon/hpre - optimise 'hpre_algs_register' error path · ed48466d
      Hui Tang 提交于
      There is redundant code especially when registing new algorithms
      in the future.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      ed48466d
    • H
      crypto: hisilicon/hpre - delete wrap of 'CONFIG_CRYPTO_DH' · bbe6c4ba
      Hui Tang 提交于
      'CRYPTO_DH' has selected in 'Kconfig', so delete 'CONFIG_CRYPTO_DH'.
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      bbe6c4ba
    • M
      crypto: ecc - Correct an error in the comments · 0193b32f
      Meng Yu 提交于
      Remove repeated word 'bit' in comments.
      Signed-off-by: NMeng Yu <yumeng18@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0193b32f
    • T
      crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init · 8609f5cf
      Tong Zhang 提交于
      ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown()
      before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the
      vf2pf_lock is initialized in adf_dev_init(), which can fail and when it
      fail, the vf2pf_lock is either not initialized or destroyed, a subsequent
      use of vf2pf_lock will cause issue.
      To fix this issue, only set this flag if adf_dev_init() returns 0.
      
      [    7.178404] BUG: KASAN: user-memory-access in __mutex_lock.isra.0+0x1ac/0x7c0
      [    7.180345] Call Trace:
      [    7.182576]  mutex_lock+0xc9/0xd0
      [    7.183257]  adf_iov_putmsg+0x118/0x1a0 [intel_qat]
      [    7.183541]  adf_vf2pf_shutdown+0x4d/0x7b [intel_qat]
      [    7.183834]  adf_dev_shutdown+0x172/0x2b0 [intel_qat]
      [    7.184127]  adf_probe+0x5e9/0x600 [qat_dh895xccvf]
      Signed-off-by: NTong Zhang <ztong0001@gmail.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Fixes: 25c6ffb2 ("crypto: qat - check if PF is running")
      Acked-by: NGiovanni Cabiddu <giovanni.cabiddu@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      8609f5cf
    • T
      crypto: qat - don't release uninitialized resources · b66accaa
      Tong Zhang 提交于
      adf_vf_isr_resource_alloc() is not unwinding correctly when error
      happens and it want to release uninitialized resources.
      To fix this, only release initialized resources.
      
      [    1.792845] Trying to free already-free IRQ 11
      [    1.793091] WARNING: CPU: 0 PID: 182 at kernel/irq/manage.c:1821 free_irq+0x202/0x380
      [    1.801340] Call Trace:
      [    1.801477]  adf_vf_isr_resource_free+0x32/0xb0 [intel_qat]
      [    1.801785]  adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat]
      [    1.802105]  adf_dev_init+0xba/0x140 [intel_qat]
      Signed-off-by: NTong Zhang <ztong0001@gmail.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Fixes: dd0f3683 ("crypto: qat - Add qat dh895xcc VF driver")
      Acked-by: NGiovanni Cabiddu <giovanni.cabiddu@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      b66accaa
    • L
      crypto: nitrox - Demote non-compliant kernel-doc headers · 5b0ef799
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/cavium/nitrox/nitrox_isr.c:17: warning: expecting prototype for One vector for each type of ring(). Prototype was for NR_RING_VECTORS() instead
       drivers/crypto/cavium/nitrox/nitrox_isr.c:224: warning: Function parameter or member 'irq' not described in 'nps_core_int_isr'
       drivers/crypto/cavium/nitrox/nitrox_isr.c:224: warning: Function parameter or member 'data' not described in 'nps_core_int_isr'
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5b0ef799
    • L
      crypto: nx - Repair some kernel-doc problems · d007bac1
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'tfm' not described in 'cbc_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'in_key' not described in 'cbc_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'key_len' not described in 'cbc_aes_nx_set_key'
       drivers/crypto/nx/nx-aes-cbc.c:24: warning: expecting prototype for Nest Accelerators driver(). Prototype was for cbc_aes_nx_set_key() instead
       drivers/crypto/nx/nx_debugfs.c:34: warning: Function parameter or member 'drv' not described in 'nx_debugfs_init'
       drivers/crypto/nx/nx_debugfs.c:34: warning: expecting prototype for Nest Accelerators driver(). Prototype was for nx_debugfs_init() instead
       drivers/crypto/nx/nx.c:31: warning: Incorrect use of kernel-doc format:  * nx_hcall_sync - make an H_COP_OP hcall for the passed in op structure
       drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'nx_ctx' not described in 'nx_hcall_sync'
       drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'op' not described in 'nx_hcall_sync'
       drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'may_sleep' not described in 'nx_hcall_sync'
       drivers/crypto/nx/nx.c:43: warning: expecting prototype for Nest Accelerators driver(). Prototype was for nx_hcall_sync() instead
       drivers/crypto/nx/nx.c:209: warning: Function parameter or member 'nbytes' not described in 'trim_sg_list'
      
      Cc: "Breno Leitão" <leitao@debian.org>
      Cc: Nayna Jain <nayna@linux.ibm.com>
      Cc: Paulo Flabiano Smorigo <pfsmorigo@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Kent Yoder <yoder1@us.ibm.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      d007bac1
    • L
      crypto: vmx - Source headers are not good kernel-doc candidates · 32c2e6dd
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/vmx/vmx.c:23: warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead
      
      Cc: "Breno Leitão" <leitao@debian.org>
      Cc: Nayna Jain <nayna@linux.ibm.com>
      Cc: Paulo Flabiano Smorigo <pfsmorigo@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Henrique Cerri <mhcerri@br.ibm.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      32c2e6dd
    • L
      crypto: caam - Provide the name of the function and provide missing descriptions · 0beb2b60
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead
       drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'xts_key_fallback' not described in 'caam_ctx'
       drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'fallback' not described in 'caam_ctx'
      
      Cc: "Horia Geantă" <horia.geanta@nxp.com>
      Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Reviewed-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0beb2b60
    • L
      crypto: atmel-ecc - Struct headers need to start with keyword 'struct' · 71057841
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/atmel-ecc.c:41: warning: cannot understand function prototype: 'struct atmel_ecdh_ctx '
      
      Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Reviewed-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      71057841
    • L
      crypto: keembay - Fix incorrectly named functions/structs · e2dcca6a
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/keembay/ocs-hcu.c:107: warning: expecting prototype for struct ocs_hcu_dma_list. Prototype was for struct ocs_hcu_dma_entry instead
       drivers/crypto/keembay/ocs-hcu.c:127: warning: expecting prototype for struct ocs_dma_list. Prototype was for struct ocs_hcu_dma_list instead
       drivers/crypto/keembay/ocs-hcu.c:610: warning: expecting prototype for ocs_hcu_digest(). Prototype was for ocs_hcu_hash_update() instead
       drivers/crypto/keembay/ocs-hcu.c:648: warning: expecting prototype for ocs_hcu_hash_final(). Prototype was for ocs_hcu_hash_finup() instead
      
      Cc: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
      Cc: Declan Murphy <declan.murphy@intel.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Reviewed-by: NDaniele Alessandrelli <daniele.alessandrelli@intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e2dcca6a
    • L
      crypto: ux500/hash - Fix worthy kernel-doc headers and remove others · 0368853e
      Lee Jones 提交于
      The ones remove here not only fail to conform to kernel-doc, but also
      provide no value, so let's remove them completely in this case.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/ux500/hash/hash_core.c:368: warning: Function parameter or member 'ctx' not described in 'hash_get_device_data'
       drivers/crypto/ux500/hash/hash_core.c:368: warning: Excess function parameter 'hash_ctx' description in 'hash_get_device_data'
       drivers/crypto/ux500/hash/hash_core.c:551: warning: expecting prototype for hash_init(). Prototype was for ux500_hash_init() instead
       drivers/crypto/ux500/hash/hash_core.c:592: warning: Function parameter or member 'length' not described in 'hash_processblock'
       drivers/crypto/ux500/hash/hash_core.c:1302: warning: expecting prototype for hash_update(). Prototype was for ahash_update() instead
       drivers/crypto/ux500/hash/hash_core.c:1322: warning: expecting prototype for hash_final(). Prototype was for ahash_final() instead
       drivers/crypto/ux500/hash/hash_core.c:1622: warning: Function parameter or member 'device_data' not described in 'ahash_algs_register_all'
       drivers/crypto/ux500/hash/hash_core.c:1622: warning: expecting prototype for hash_algs_register_all(). Prototype was for ahash_algs_register_all() instead
       drivers/crypto/ux500/hash/hash_core.c:1647: warning: Function parameter or member 'device_data' not described in 'ahash_algs_unregister_all'
       drivers/crypto/ux500/hash/hash_core.c:1647: warning: expecting prototype for hash_algs_unregister_all(). Prototype was for ahash_algs_unregister_all() instead
       drivers/crypto/ux500/cryp/cryp.c:19: warning: Incorrect use of kernel-doc format:  * cryp_wait_until_done - wait until the device logic is not busy
       drivers/crypto/ux500/cryp/cryp.c:22: warning: Function parameter or member 'device_data' not described in 'cryp_wait_until_done'
       drivers/crypto/ux500/cryp/cryp.c:22: warning: expecting prototype for ST(). Prototype was for cryp_wait_until_done() instead
       drivers/crypto/ux500/cryp/cryp.c:292: warning: Function parameter or member 'cryp_mode' not described in 'cryp_save_device_context'
       drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: Function parameter or member 'device_data' not described in 'cryp_enable_irq_src'
       drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: Function parameter or member 'irq_src' not described in 'cryp_enable_irq_src'
       drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: expecting prototype for ST(). Prototype was for cryp_enable_irq_src() instead
       drivers/crypto/ux500/cryp/cryp_core.c:42: warning: expecting prototype for ST(). Prototype was for CRYP_MAX_KEY_SIZE() instead
       drivers/crypto/ux500/cryp/cryp_core.c:91: warning: Function parameter or member 'key' not described in 'cryp_ctx'
       drivers/crypto/ux500/cryp/cryp_core.c:91: warning: Function parameter or member 'session_id' not described in 'cryp_ctx'
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Shujuan Chen <shujuan.chen@stericsson.com>
      Cc: Joakim Bech <joakim.xx.bech@stericsson.com>
      Cc: Berne Hebark <berne.herbark@stericsson.com>
      Cc: Niklas Hernaeus <niklas.hernaeus@stericsson.com>
      Cc: Jonas Linde <jonas.linde@stericsson.com>
      Cc: Andreas Westin <andreas.westin@stericsson.com>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0368853e
    • L
      crypto: chelsio - Fix some kernel-doc issues · 29e5b878
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/chelsio/chcr_core.c:2: warning: wrong kernel-doc identifier on line:
       drivers/crypto/chelsio/chcr_algo.c:806: warning: Function parameter or member 'wrparam' not described in 'create_cipher_wr'
       drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'req' description in 'create_cipher_wr'
       drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'ctx' description in 'create_cipher_wr'
       drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'qid' description in 'create_cipher_wr'
       drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'op_type' description in 'create_cipher_wr'
       drivers/crypto/chelsio/chcr_algo.c:1566: warning: Function parameter or member 'req' not described in 'create_hash_wr'
       drivers/crypto/chelsio/chcr_algo.c:1566: warning: Function parameter or member 'param' not described in 'create_hash_wr'
      
      Cc: Ayush Sawal <ayush.sawal@chelsio.com>
      Cc: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
      Cc: Rohit Maheshwari <rohitm@chelsio.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Manoj Malviya <manojmalviya@chelsio.com>
      Cc: Atul Gupta <atul.gupta@chelsio.com>
      Cc: Jitendra Lulla <jlulla@chelsio.com>
      Cc: M R Gowda <yeshaswi@chelsio.com>
      Cc: Harsh Jain <harsh@chelsio.com>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      29e5b878
    • L
      crypto: bcm - Fix a whole host of kernel-doc misdemeanours · 85a557cb
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'from_nents' not described in 'spu_msg_sg_add'
       drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'length' not described in 'spu_msg_sg_add'
       drivers/crypto/bcm/spu.c:464: warning: Excess function parameter 'Return' description in 'spum_gcm_ccm_pad_len'
       drivers/crypto/bcm/spu.c:524: warning: Function parameter or member 'iv_len' not described in 'spum_aead_ivlen'
       drivers/crypto/bcm/spu.c:524: warning: expecting prototype for spu_aead_ivlen(). Prototype was for spum_aead_ivlen() instead
       drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'alg_digest_size' not described in 'spum_digest_size'
       drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'alg' not described in 'spum_digest_size'
       drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'htype' not described in 'spum_digest_size'
       drivers/crypto/bcm/spu.c:583: warning: bad line:
       drivers/crypto/bcm/spu.c:927: warning: Function parameter or member 'is_inbound' not described in 'spum_cipher_req_finish'
       drivers/crypto/bcm/spu.c:927: warning: Excess function parameter 'isInbound' description in 'spum_cipher_req_finish'
       drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'fmd' not described in 'spu2_fmd_init'
       drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'spu2_type' not described in 'spu2_fmd_init'
       drivers/crypto/bcm/spu2.c:557: warning: Excess function parameter 'spu2_cipher_type' description in 'spu2_fmd_init'
       drivers/crypto/bcm/spu2.c:615: warning: Function parameter or member 'auth_first' not described in 'spu2_fmd_ctrl0_write'
       drivers/crypto/bcm/spu2.c:615: warning: Excess function parameter 'authFirst' description in 'spu2_fmd_ctrl0_write'
       drivers/crypto/bcm/spu2.c:666: warning: Function parameter or member 'is_inbound' not described in 'spu2_fmd_ctrl1_write'
       drivers/crypto/bcm/spu2.c:803: warning: expecting prototype for spu_payload_length(). Prototype was for spu2_payload_length() instead
       drivers/crypto/bcm/spu2.c:825: warning: Function parameter or member 'is_hash' not described in 'spu2_response_hdr_len'
       drivers/crypto/bcm/spu2.c:825: warning: expecting prototype for spu_response_hdr_len(). Prototype was for spu2_response_hdr_len() instead
       drivers/crypto/bcm/spu2.c:843: warning: expecting prototype for spu_hash_pad_len(). Prototype was for spu2_hash_pad_len() instead
       drivers/crypto/bcm/spu2.c:855: warning: Function parameter or member 'cipher_mode' not described in 'spu2_gcm_ccm_pad_len'
       drivers/crypto/bcm/spu2.c:855: warning: Function parameter or member 'data_size' not described in 'spu2_gcm_ccm_pad_len'
       drivers/crypto/bcm/spu2.c:855: warning: expecting prototype for spu2_gcm_ccm_padlen(). Prototype was for spu2_gcm_ccm_pad_len() instead
       drivers/crypto/bcm/spu2.c:872: warning: expecting prototype for spu_assoc_resp_len(). Prototype was for spu2_assoc_resp_len() instead
       drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'alg_digest_size' not described in 'spu2_digest_size'
       drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'alg' not described in 'spu2_digest_size'
       drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'htype' not described in 'spu2_digest_size'
       drivers/crypto/bcm/spu2.c:945: warning: expecting prototype for spu_create_request(). Prototype was for spu2_create_request() instead
       drivers/crypto/bcm/spu2.c:1122: warning: expecting prototype for spu_cipher_req_init(). Prototype was for spu2_cipher_req_init() instead
       drivers/crypto/bcm/spu2.c:1182: warning: Function parameter or member 'is_inbound' not described in 'spu2_cipher_req_finish'
       drivers/crypto/bcm/spu2.c:1182: warning: expecting prototype for spu_cipher_req_finish(). Prototype was for spu2_cipher_req_finish() instead
       drivers/crypto/bcm/spu2.c:1243: warning: expecting prototype for spu_request_pad(). Prototype was for spu2_request_pad() instead
       drivers/crypto/bcm/spu2.c:1321: warning: expecting prototype for spu_status_process(). Prototype was for spu2_status_process() instead
       drivers/crypto/bcm/cipher.c:1048: warning: Function parameter or member 'req' not described in 'spu_aead_rx_sg_create'
       drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'cipher' not described in 'rfc4543_gcm_esp_setkey'
       drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'key' not described in 'rfc4543_gcm_esp_setkey'
       drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'keylen' not described in 'rfc4543_gcm_esp_setkey'
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Rob Rice <rob.rice@broadcom.com>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      85a557cb
    • L
      crypto: hisilicon/sec - Supply missing description for 'sec_queue_empty()'s 'queue' param · 45394566
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/crypto/hisilicon/sec/sec_drv.c:843: warning: Function parameter or member 'queue' not described in 'sec_queue_empty'
      
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Zaibo Xu <xuzaibo@huawei.com>
      Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
      Cc: linux-crypto@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      45394566
    • B
    • M
      crypto: jitterentropy - Put constants on the right side of the expression · 36c25011
      Milan Djurovic 提交于
      This patch fixes the following checkpatch.pl warnings:
      
      crypto/jitterentropy.c:600: WARNING: Comparisons should place the constant on the right side of the test
      crypto/jitterentropy.c:681: WARNING: Comparisons should place the constant on the right side of the test
      crypto/jitterentropy.c:772: WARNING: Comparisons should place the constant on the right side of the test
      crypto/jitterentropy.c:829: WARNING: Comparisons should place the constant on the right side of the test
      Signed-off-by: NMilan Djurovic <mdjurovic@zohomail.com>
      Reviewed-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      36c25011
    • Z
      hwrng: core - convert sysfs sprintf/snprintf family to sysfs_emit · 91253022
      Zihao Tang 提交于
      Fix the following coccicheck warning:
      
      drivers/char/hw_random/core.c:399:8-16: WARNING: use scnprintf or sprintf.
      Signed-off-by: NZihao Tang <tangzihao1@hisilicon.com>
      Signed-off-by: NJay Fang <f.fangjian@huawei.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      91253022
    • X
      crypto: allwinner - Fix the parameter of dma_unmap_sg() · 884b93c5
      Xiang Chen 提交于
      For function dma_unmap_sg(), the <nents> parameter should be number of
      elements in the scatterlist prior to the mapping, not after the mapping.
      So fix this usage.
      Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
      Acked-by: NCorentin LABBE <clabbe.montjoie@gmail.com>
      Tested-by: NCorentin LABBE <clabbe.montjoie@gmail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      884b93c5
    • X
      crypto: ux500 - Fix the parameter of dma_unmap_sg() · ade18fb4
      Xiang Chen 提交于
      For function dma_unmap_sg(), the <nents> parameter should be number of
      elements in the scatterlist prior to the mapping, not after the mapping.
      So fix this usage.
      Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      ade18fb4
    • X
      crypto: cavium - Fix the parameter of dma_unmap_sg() · c114ecd3
      Xiang Chen 提交于
      For function dma_unmap_sg(), the <nents> parameter should be number of
      elements in the scatterlist prior to the mapping, not after the mapping.
      So fix this usage.
      Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c114ecd3
    • X
      crypto: amlogic - Fix the parameter of dma_unmap_sg() · 5595d0dc
      Xiang Chen 提交于
      For function dma_unmap_sg(), the <nents> parameter should be number of
      elements in the scatterlist prior to the mapping, not after the mapping.
      So fix this usage.
      Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5595d0dc
    • R
      crypto: ccp - fix command queuing to TEE ring buffer · 00aa6e65
      Rijo Thomas 提交于
      Multiple threads or clients can submit a command to the TEE ring
      buffer. This patch helps to synchronize command submission to the
      ring.
      
      One thread shall write a command to a TEE ring buffer entry only if:
      
       - Trusted OS has notified that the TEE command for the given entry
         has been processed and driver has copied the TEE response into
         client buffer.
      
       - The command entry is empty and can be written into.
      
      After a command has been written to the TEE ring buffer, the global
      wptr (mutex protected) shall be incremented for use by next client.
      
      If PSP became unresponsive while processing TEE request from a
      client, then further command submission to queue will be disabled.
      
      Fixes: 33960acc (crypto: ccp - add TEE support for Raven Ridge)
      Reviewed-by: NDevaraj Rangasamy <Devaraj.Rangasamy@amd.com>
      Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      00aa6e65
    • R
      crypto: ccp - reduce tee command status polling interval from 5ms to 1ms · 4a5eed17
      Rijo Thomas 提交于
      The PSP TEE device driver polls the command status variable every
      5ms to check for command completion. Reduce this time to 1ms so that
      there is an improvement in driver response time to clients which submit
      TEE commands.
      Reviewed-by: NDevaraj Rangasamy <Devaraj.Rangasamy@amd.com>
      Signed-off-by: NRijo Thomas <Rijo-john.Thomas@amd.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      4a5eed17
    • T
      hwrng: intel - Fix included header from 'asm · e656459b
      Tian Tao 提交于
      This commit fixes the checkpatch warning:
      WARNING: Use #include <linux/io.h> instead of <asm/io.h>
      34: FILE: drivers/char/hw_random/intel-rng.c:34:
      Signed-off-by: NTian Tao <tiantao6@hisilicon.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e656459b
    • H
      Merge branch 'ecc' · 3877869d
      Herbert Xu 提交于
      This pulls in the NIST P384/256/192 x509 changes.
      3877869d
    • S
      x509: Add OID for NIST P384 and extend parser for it · 2a8e6154
      Saulo Alessandre 提交于
      Prepare the x509 parser to accept NIST P384 certificates and add the
      OID for ansip384r1, which is the identifier for NIST P384.
      
      Summary of changes:
      
      * crypto/asymmetric_keys/x509_cert_parser.c
        - prepare x509 parser to load NIST P384
      
      * include/linux/oid_registry.h
        - add OID_ansip384r1
      Signed-off-by: NSaulo Alessandre <saulo.alessandre@tse.jus.br>
      Tested-by: NStefan Berger <stefanb@linux.ibm.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      2a8e6154