OpenCloudOS-Kernel/drivers/crypto/marvell/octeontx2
Arnd Bergmann 6956d8be23 crypto: octeontx2 - fix -Wpointer-bool-conversion warning
When CONFIG_CPUMASK_OFFSTACK is disabled, clang reports a warning
about a bogus condition:

drivers/crypto/marvell/octeontx2/otx2_cptlf.c:334:21: error: address of array 'lfs->lf[slot].affinity_mask' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                if (lfs->lf[slot].affinity_mask)
                ~~  ~~~~~~~~~~~~~~^~~~~~~~~~~~~

In this configuration, the free_cpumask_var() function does nothing,
so the condition could be skipped.

When the option is enabled, there is no warning, but the check
is also redundant because free_cpumask_var() falls back to kfree(),
which is documented as ignoring NULL pointers.

Remove the check to avoid the warning.

Fixes: 6450601703 ("crypto: octeontx2 - add LF framework")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-02-10 17:56:00 +11:00
..
Makefile crypto: octeontx2 - register with linux crypto framework 2021-01-22 14:58:03 +11:00
otx2_cpt_common.h crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cpt_hw_types.h
otx2_cpt_mbox_common.c crypto: octeontx2 - add virtual function driver support 2021-01-22 14:58:03 +11:00
otx2_cpt_reqmgr.h crypto: octeontx2 - register with linux crypto framework 2021-01-22 14:58:03 +11:00
otx2_cptlf.c crypto: octeontx2 - fix -Wpointer-bool-conversion warning 2021-02-10 17:56:00 +11:00
otx2_cptlf.h crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cptpf.h crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cptpf_main.c crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cptpf_mbox.c crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cptpf_ucode.c crypto: octeontx2 - add support to get engine capabilities 2021-01-22 14:58:03 +11:00
otx2_cptpf_ucode.h crypto: octeontx2 - add support to get engine capabilities 2021-01-22 14:58:03 +11:00
otx2_cptvf.h crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cptvf_algs.c crypto: octeontx2 - register with linux crypto framework 2021-01-22 14:58:03 +11:00
otx2_cptvf_algs.h crypto: octeontx2 - register with linux crypto framework 2021-01-22 14:58:03 +11:00
otx2_cptvf_main.c crypto: octeontx2 - fix signedness bug in cptvf_register_interrupts() 2021-02-05 14:31:35 +11:00
otx2_cptvf_mbox.c crypto: octeontx2 - add support to process the crypto request 2021-01-22 14:58:03 +11:00
otx2_cptvf_reqmgr.c crypto: octeontx2 - register with linux crypto framework 2021-01-22 14:58:03 +11:00