mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 00:04:47 +08:00
6956d8be23
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:
|
||
---|---|---|
.. | ||
Makefile | ||
otx2_cpt_common.h | ||
otx2_cpt_hw_types.h | ||
otx2_cpt_mbox_common.c | ||
otx2_cpt_reqmgr.h | ||
otx2_cptlf.c | ||
otx2_cptlf.h | ||
otx2_cptpf_main.c | ||
otx2_cptpf_mbox.c | ||
otx2_cptpf_ucode.c | ||
otx2_cptpf_ucode.h | ||
otx2_cptpf.h | ||
otx2_cptvf_algs.c | ||
otx2_cptvf_algs.h | ||
otx2_cptvf_main.c | ||
otx2_cptvf_mbox.c | ||
otx2_cptvf_reqmgr.c | ||
otx2_cptvf.h |