alistair23-linux/drivers/crypto
Nathan Chancellor 18e732b803 crypto: ccree - avoid implicit enum conversion
Clang warns when one enumerated type is implicitly converted to another
and this happens in several locations in this driver, ultimately related
to the set_cipher_{mode,config0} functions. set_cipher_mode expects a mode
of type drv_cipher_mode and set_cipher_config0 expects a mode of type
drv_crypto_direction.

drivers/crypto/ccree/cc_ivgen.c:58:35: warning: implicit conversion from
enumeration type 'enum cc_desc_direction' to different enumeration type
'enum drv_crypto_direction' [-Wenum-conversion]
        set_cipher_config0(&iv_seq[idx], DESC_DIRECTION_ENCRYPT_ENCRYPT);

drivers/crypto/ccree/cc_hash.c:99:28: warning: implicit conversion from
enumeration type 'enum cc_hash_conf_pad' to different enumeration type
'enum drv_crypto_direction' [-Wenum-conversion]
                set_cipher_config0(desc, HASH_DIGEST_RESULT_LITTLE_ENDIAN);

drivers/crypto/ccree/cc_aead.c:1643:30: warning: implicit conversion
from enumeration type 'enum drv_hash_hw_mode' to different enumeration
type 'enum drv_cipher_mode' [-Wenum-conversion]
        set_cipher_mode(&desc[idx], DRV_HASH_HW_GHASH);

Since this fundamentally isn't a problem because these values just
represent simple integers for a shift operation, make it clear to Clang
that this is okay by making the mode parameter in both functions an int.

Link: https://github.com/ClangBuiltLinux/linux/issues/46
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-10-17 14:16:18 +08:00
..
amcc crypto: skcipher - remove useless setting of type flags 2018-07-09 00:30:27 +08:00
axis crypto: axis - fix platform_no_drv_owner.cocci warnings 2018-10-12 14:20:44 +08:00
bcm crypto: aead - remove useless setting of type flags 2018-07-09 00:30:26 +08:00
caam crypto: caam - add SPDX license identifier to all files 2018-10-17 14:16:18 +08:00
cavium crypto: cavium/nitrox - use pci_alloc_irq_vectors() while enabling MSI-X. 2018-10-05 10:22:48 +08:00
ccp crypto: ccp - Make function sev_get_firmware() static 2018-10-05 10:16:56 +08:00
ccree crypto: ccree - avoid implicit enum conversion 2018-10-17 14:16:18 +08:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-10-17 14:14:06 +08:00
hisilicon crypto: hisilicon - sec_send_request() can be static 2018-08-07 17:51:39 +08:00
inside-secure crypto: inside-secure - initialize first_rdesc to make GCC happy 2018-07-20 13:51:22 +08:00
marvell crypto: remove redundant type flags from tfm allocation 2018-07-09 00:30:29 +08:00
mediatek headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
nx powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
qat Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-10-17 14:14:06 +08:00
qce crypto: qce - Remove VLA usage of skcipher 2018-09-28 12:46:08 +08:00
rockchip License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stm32 Char/Misc driver patches for 4.19-rc1 2018-08-18 11:04:51 -07:00
sunxi-ss crypto: skcipher - remove useless setting of type flags 2018-07-09 00:30:27 +08:00
ux500 Char/Misc driver patches for 4.19-rc1 2018-08-18 11:04:51 -07:00
virtio Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-08-15 16:01:47 -07:00
vmx crypto: vmx - Remove VLA usage of skcipher 2018-09-28 12:46:08 +08:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c crypto: atmel - switch to SPDX license identifiers 2018-09-04 11:37:04 +08:00
atmel-authenc.h crypto: atmel - switch to SPDX license identifiers 2018-09-04 11:37:04 +08:00
atmel-ecc.c crypto: atmel - switch to SPDX license identifiers 2018-09-04 11:37:04 +08:00
atmel-ecc.h crypto: atmel - switch to SPDX license identifiers 2018-09-04 11:37:04 +08:00
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c crypto: atmel - switch to SPDX license identifiers 2018-09-04 11:37:04 +08:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c crypto: atmel - switch to SPDX license identifiers 2018-09-04 11:37:04 +08:00
exynos-rng.c crypto: drivers - simplify getting .drvdata 2018-04-28 16:09:35 +08:00
geode-aes.c
geode-aes.h
hifn_795x.c crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()' 2017-11-29 17:33:30 +11:00
img-hash.c
ixp4xx_crypto.c crypto: ixp4xx - don't leak pointers to authenc keys 2018-03-31 01:33:12 +08:00
Kconfig crypto: hisilicon - SEC security accelerator driver 2018-08-03 18:06:02 +08:00
Makefile crypto: caam/qi2 - add DPAA2-CAAM driver 2018-09-21 13:24:51 +08:00
mxc-scc.c
mxs-dcp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-10-17 14:14:06 +08:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c crypto: ahash - remove useless setting of type flags 2018-07-09 00:30:25 +08:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c crypto: omap-aes - pr_err() strings should end with newlines 2017-10-12 22:54:51 +08:00
omap-aes.c crypto: omap-aes - Remove VLA usage of skcipher 2018-09-28 12:46:09 +08:00
omap-aes.h crypto: omap-aes - Remove VLA usage of skcipher 2018-09-28 12:46:09 +08:00
omap-crypto.c crypto: omap-crypto - Verify page zone scatterlists before starting DMA 2018-03-09 22:45:36 +08:00
omap-crypto.h
omap-des.c crypto: omap - convert to new crypto engine API 2018-02-15 23:26:51 +08:00
omap-sham.c crypto: ahash - remove useless setting of type flags 2018-07-09 00:30:25 +08:00
padlock-aes.c crypto: padlock-aes - Fix Nano workaround data corruption 2018-07-20 13:47:42 +08:00
padlock-sha.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
picoxcell_crypto.c crypto: picoxcell - Remove VLA usage of skcipher 2018-09-28 12:46:09 +08:00
picoxcell_crypto_regs.h
qcom-rng.c crypto: qcom-rng - Add ACPI support 2018-07-27 19:04:32 +08:00
s5p-sss.c crypto: s5p-sss: Add aes-ctr support 2018-09-28 12:46:06 +08:00
sahara.c crypto: sahara - Remove VLA usage of skcipher 2018-09-28 12:46:08 +08:00
talitos.c crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
talitos.h crypto: talitos - chain in buffered data for ahash on SEC1 2017-10-12 22:55:38 +08:00